Debug Code

If your code does not run successfully, you should debug it.

How Debug Works

When you click the “Debug Project” toolbar icon , the following occurs:

Debug progress is visible in the Output window.

Debugging Your Application Code

To debug your application code:

  1. 1.In the Projects window, select your project or make it the main project (right click on the project and select “Set as Main Project”).
  2. 2.Click on the “Debug Project” icon or “Step Into” icon to begin debugging.

To halt your application code:

Click on the “Pause” icon to halt your program execution.

To run your code again:

Click on the “Continue” icon to start your program execution again.

To end execution of your code:

Click on the “Finish Debugger Session” icon to end your program execution.

To launch the debugger:

If your code is built for debugging and you simply want to launch the debug tool, you can do so by selecting the down arrow next to the “Debug Project” icon and select “Launch Debugger.”

Table 1. Debug Icons
Icon Function Related Menu Item
Debug Project Debug>Debug Project
Step Into Debug>Step Into
Pause Debug>Pause
Continue Debug>Continue
Finish Debug Session Debug>Finish Debugger Session