Syntax
What it does
- Connects to running Android app via
adb - Tails the Laravel log file from the app’s storage
- Displays log entries in real-time
- Press Ctrl+C to stop
Examples
Tail logs from running app
Requirements
ADB (Android Debug Bridge)
Must be installed and in PATH:Running Android app
The app must be:- Installed on connected device/emulator
- Currently running
- Built with debuggable flag enabled
App ID
NATIVEPHP_APP_ID must be set in .env:
How it works
Usesadb shell run-as to access the app’s private storage:
Common workflows
Run and monitor logs
Debug with watch and logs
- Code changes (Terminal 1)
- Log output (Terminal 2)
- Hot reload updates
Filter logs
Pipe to grep for specific messages:Logging best practices
Use Laravel’s logging in your mobile app:Add context
Include useful context:Performance logging
Troubleshooting
”NATIVEPHP_APP_ID is not set”
Add to.env:
“adb: command not found”
Install Android platform tools:“device offline” or “no devices”
Check device connection:“run-as: package not debuggable”
App must be built with debug flag. Use:No log output
Check:- App is running:
adb shell ps | grep your.app.id - Log file exists: Trigger an action that logs
- Log level: Check
config/logging.phplevel
Alternative: Use Logcat
For system-level logs:iOS equivalent
For iOS, use Xcode Console:- Run app with Xcode or
native:run ios - Open Xcode
- Window > Devices and Simulators
- Select your device/simulator
- Click “Open Console” button
- Filter by app name
See also
- native:run - Run your app
- native:watch - Hot reload during development
- Debugging - Complete debugging guide