Remote Debugging: Real-Time Debug from Your Phone
Configure and use Pocket Code's remote debugging tools to efficiently find and fix bugs from your mobile device.
Remote Debugging: Real-Time Debug from Your Phone
Debugging is an essential part of development. Pocket Code includes professional debug tools that work directly from your Android device.
Available debugging tools
Breakpoints
Tap on a line number to set a breakpoint. Code will pause at that point so you can inspect variables:
def calculate_price(product, quantity):
subtotal = product.price * quantity # β Breakpoint here
discount = apply_discount(subtotal)
total = subtotal - discount
return total
Variables panel
When code is paused at a breakpoint, the side panel shows:
- Local variables β Values in the current scope
- Global variables β Application global state
- Watch expressions β Custom expressions you monitor
- Call stack β The call stack to the current point
Interactive console
Execute expressions while code is paused:
> subtotal
150.00
> discount
22.50
> product.name
"Mechanical Keyboard"
Remote debugging
Connect your debug session to a remote server:
Configuration
- Open Settings > Debug > Remote
- Enter the server IP and port
- Select the protocol (DAP, Chrome DevTools, etc.)
- Tap Connect
Supported protocols
| Protocol | Languages | Default port |
|---|---|---|
| DAP | Python, Node.js, C++ | 5678 |
| Chrome DevTools | JavaScript, TypeScript | 9229 |
| JDWP | Java, Kotlin | 5005 |
| Delve | Go | 2345 |
Example: Debugging a Node.js app
On your server, start the app in debug mode:
node --inspect=0.0.0.0:9229 app.js
In Pocket Code, connect to the server:
{
"type": "node",
"request": "attach",
"address": "192.168.1.100",
"port": 9229,
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app"
}
Tips for efficient debugging
- Conditional breakpoints: Only pause when a condition is met
- Logpoints: Print messages without stopping execution
- Step Over/Into/Out: Navigate through code step by step
- Hot Reload: Changes apply without restarting the session
- Snapshots: Save state for later comparison
Performance profiling
Besides debug, Pocket Code includes profiling tools:
- CPU Profiler β Identify slow functions
- Memory Profiler β Detect memory leaks
- Network Monitor β Analyze HTTP requests
- Flame Graph β Visualize execution time
With Pocket Code's debugging tools, finding and fixing bugs is as efficient from mobile as it is from a PC. Configure your debug environment and improve your code quality.