Debugging Tools & Breakpoints in GoCodeMe IDE
Effective debugging is essential for productive development. GoCodeMe IDE provides a full-featured debugger that supports breakpoints, watch expressions, call stack inspection, and more for multiple languages including JavaScript, Python, PHP, and Go.
Launching the Debugger
- Open the file you want to debug.
- Click the Run & Debug icon in the left sidebar (play button with a bug).
- Select or create a launch configuration. GoCodeMe auto-detects your project type and suggests a default config.
- Click Start Debugging (F5).
Setting Breakpoints
Click in the gutter (left margin) next to a line number to set a breakpoint. A red dot appears. When execution reaches that line, the program pauses and the debugger activates.
- Conditional breakpoints: Right-click a breakpoint and add a condition (e.g.,
i > 10). Execution pauses only when the condition is true. - Logpoints: Instead of pausing, a logpoint prints a message to the debug console. Useful for inspecting values without stopping the program.
- Hit count breakpoints: Pause only after the breakpoint has been hit a specified number of times.
Debug Panels
| Panel | Purpose |
|---|---|
| Variables | Displays local, global, and closure variables at the current scope |
| Watch | Add custom expressions to monitor their values as you step through code |
| Call Stack | Shows the chain of function calls that led to the current breakpoint |
| Breakpoints | Lists all breakpoints; toggle or remove them in bulk |
Stepping Through Code
- Step Over (F10): Execute the current line and move to the next one.
- Step Into (F11): Enter the function call on the current line.
- Step Out (Shift+F11): Run to the end of the current function and return to the caller.
- Continue (F5): Resume execution until the next breakpoint.
Remote Debugging
GoCodeMe supports attaching to remote processes via SSH or Docker. Configure a remote attach configuration in .gocodeme/launch.json with the target host, port, and source map paths.
Tips
- Use the Debug Console to evaluate expressions on the fly while paused.
- Enable Inline Values in settings to see variable values directly in the editor next to each line.
- Ask Alfred: "Alfred, why is this variable null?" for AI-assisted debugging insights.