Debugging

Plato can be used to launch the Win32 debugger called SDBG or the x64 debugger called SDBG64. In order to debug code for .NET you must use Visual Studio.

Both SDBG and SDBG64 can be launched from Plato as external applications. This provides an independent view of the source code. Alternatively they can be launched in an interactive mode where the source code is viewed from Plato. The mode can be selected from the Settings dialog on the Tools menu using the check box for "Integrate with SDBG/SDBG64".  

If your application uses command line arguments and you need to pass them to SDBG/SDBG64 then it is simpler if you create a project (even when there is only one file).

From a project

If you are working with a project, first select either CHECKMATE or DEBUG mode and build the project. Then there are two basic ways to launch the debugger:

a) In the Explorer Window, right click on the name of the project and select Step Into. This starts up the debugger and sets a break point at the first executable statement,

b) In the code window, right click on a line and select Run to Cursor. This starts up the debugger and sets a break point on the given line.

To pass command line arguments to the debugger, select Properties from the Project menu and under the Miscellaneous section of Compiler Options, set the Launch arguments.

Single file - no project

If you are working with a single file (with no project open) first build the file using compiler options (such as /CHECKMATE) that plant debugging code. The build command can be found on the main Build menu. The compiler options (for use when there is no project open) are set in the Options dialog under Environment, and General.

Then, in the code window, right click on a line and select Run to Cursor. This starts up SDBG and sets a break point on the given line.

 

Controlling the debugger from Plato

The process of stepping through the code in the debugger can be controlled from Plato by using the Build toolbar...

If you cannot see this toolbar, use the View menu to make it visible.

You can also set breakpoints from Plato by pressing Ctrl+Shift and clicking in the margin of the appropriate line. If the debugger is not running, invalid breakpoints are cancelled when the debugger is started.

When stepping through the code, it is possible to step into or over a function call. From within a function you can also step out. Break points can be set and then run to and these can be made conditional.

From the main Debug menu, windows can be opened in order to view the locals, the stack, breakpoints, a watch window, the registers, and the assembly code. When the assembly window has the focus, you can press F7 in order to single step throught the assembley code.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited