Debugger
BambooBasic includes an integrated debugger that allows you to step through your code, inspect variables, and track the call stack in real-time.
Setting Breakpoints
Breakpoints pause program execution at specific lines, allowing you to inspect the program state.
- Click in the margin (between the folding controls and source code) to toggle a breakpoint
- F9 - Toggle breakpoint on the current line
- Red circle marker indicates an active breakpoint
- Debug > Clear All Breakpoints - Remove all breakpoints
Note: Breakpoints can only be set on executable statements. If you click on a comment or blank line, the breakpoint will automatically move to the next executable line.
Starting a Debug Session
- F8 - Start debugging (Debug > Start Debugging)
- Shift+F8 - Stop debugging
When debugging starts, the Debug view opens in a new tab, showing the current code position, call stack, and variables.
Debug Controls
Once execution is paused at a breakpoint, use these controls to navigate through your code:
- F12 - Continue - Resume execution until the next breakpoint
- F10 - Step Over - Execute the current line and pause at the next line (skips into functions)
- F11 - Step Into - Step into function calls to debug them line by line
- Shift+F11 - Step Out - Continue execution until returning from the current function
Debug Views
The Debug panel contains several tabs to help you inspect your program:
- Code View - Shows the source file being executed with a green arrow marking the current line
- Variables - Displays all variables in scope (Locals, Globals, Constants, and Type Fields) with their current values
- Call Stack - Shows the chain of function calls that led to the current position
- Output - Displays program output and debug messages
Viewing Variables
The Variables tab shows all accessible variables when execution is paused:
- Local - Variables in the current function scope
- Global - Global variables accessible throughout the program
- Const - Constant values
- Field - Type instance fields (shown as objectName\fieldName)
Variables are sorted alphabetically within each category. Object pointers show "valid" or "null" to indicate their state.
Navigating to Source
- F4 - Go to Source - Jump from the debug code view to the actual source file in the editor
This is particularly useful when debugging included files or stepping through library code. Press F4 to open the source file (if not already open) and navigate to the current debug line in the main editor.
Tips
- Set breakpoints at key decision points (If statements, loop conditions) to inspect logic flow
- Use the Call Stack to understand how you reached the current position
- Watch object field values to verify type instances are being modified correctly
- Step Over (F10) is faster when you don't need to debug function internals
- Step Into (F11) lets you trace execution through nested function calls
- The Variables view updates in real-time as you step through code
Keyboard Shortcuts Summary
| Key |
Action |
| F8 |
Start debugging |
| Shift+F8 |
Stop debugging |
| F9 |
Toggle breakpoint |
| F10 |
Step Over |
| F11 |
Step Into |
| Shift+F11 |
Step Out |
| F12 |
Continue |
| F4 |
Go to source file |
BambooBasic © 2026 Michael Denathorn