Debugging on Android: Breakpoints, Stepping and Hot Reload
Set breakpoints, step through code, and inspect variables and the call stack — PocketCode's debug tools work directly from your Android device.
Debugging on Android: Breakpoints, Stepping and Hot Reload
Debugging is an essential part of development. PocketCode includes debug tools that work directly on your Android device, right next to the code you're running.
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
Beyond a plain line breakpoint, PocketCode also supports:
- Conditional breakpoints — only pause when a condition you write is met
- Logpoints — print a message without stopping execution
- Exception breakpoints — pause automatically when an exception is thrown
Variables and call stack
When execution is paused, the side panel shows:
- Variables — local and global values in the current scope, expandable for nested objects
- Call stack — the chain of frames that led to the current point, with the active frame highlighted
Console
A console panel logs debug session events — session start/stop, hot reload activity, and step actions — alongside your program's own output.
Stepping and session control
Once paused, the debug toolbar gives you:
- Continue — resume until the next breakpoint
- Step Over / Into / Out — move through code one line, one call, or one return at a time
- Pause / Restart / Stop — control the session directly
Hot Reload is also available: enable it and file changes apply by auto-restarting the session, instead of stopping and starting it by hand.
Node.js debugging
For JavaScript, PocketCode's debugger talks to Node's own inspector protocol
(the same Chrome DevTools Protocol Node exposes with --inspect), so breakpoints,
stepping and the variables/call-stack panel work against a real running Node
process — no separate tool required.
An honest note on scope
Two things you might expect from a desktop debugger aren't there yet: attaching to an arbitrary remote host over the network (a fixed IP/port debug-protocol connection) and performance profiling (CPU/memory/flame-graph tooling). Neither is wired up today, so we're not going to advertise them as if they were. What's real is everything above — breakpoints, stepping, variables, call stack, and Hot Reload, running against the code you execute on your own device.
With PocketCode's debugging tools, setting a breakpoint and stepping through code is as direct from your phone as it is from a PC.
PocketCode is heading to Google Play. Join the pre-registration to be among the first to try it on your own device.
Terminal & SSH