How the integrated debugger works

The integrated debugger works in conjunction with the PowerBASIC editor and is a part of the PowerBASIC environment. The debugger allows you to debug at the PowerBASIC level rather than at the machine level. That makes it a source-level debugger.

To debug a PowerBASIC program using the integrated debugger, first load the program into the editor and choose Compile and Debug from the toolbar or menu. Your program will be compiled, and if there are no compile-time errors, it will begin executing.

Breakpoints are places where the program will stop. In most cases, you will want to set one or more breakpoints in your program. The program executes up to (but not including) the line containing the breakpoint and then passes control of the debugger over to you. Breakpoints that you set remain in place until you clear them or exit the IDE.

Once at a breakpoint you can:

· | Display the value of a variable (with the Evaluate Variable button or menu item)

· | Set up a list of variables (in the Variable Watch window) and see how their values change as the program executes

· | Clear breakpoints, set new ones, or both

· | Single-step the program (run it one line at a time)

· | Run the program to the next breakpoint

See Also

Debugging PB/Win Programs

The DEBUG Menu

Debugging a simple program

Debugger Settings