ProTrader Desktop provides debugging tools to help you identify and isolate problems in your code. The Debug menu contains commands to execute the code line by line, and the Watch panel lets you keep track of the variables as the code executes.
To start the debugging process run your module in the Tester by simply clicking the
button in the Scripting tab.
During testing, you can pause execution at anytime to explore variables or to go through step-by-step.
To single-step through problem code and examine the variables:
Set a breakpoint at the beginning of the section that seems to be causing the problem. Сlick a spot against the line on the vertical bar to the left of the text editing area. For example, here we are setting a breakpoint on line 76:

A red circle appears marking your breakpoint, and the line is highlighted in red:

Display the Watch panel (if hidden) by selecting Scripting > Watch. Add the variables to track by right-clicking and selecting Add watch and typing in the names, or simply dragging the variables from the Editor onto the Watch panel.
Select Scripting > Run, to compile the project and run to the breakpoint you have set:

Now, single-step beyond the breakpoint using the step commands in the Project menu:
| Step Into | Executes the current line. If the line contains a function call, then it enters the function and lets you single-step through it | |
| Step Over | Executes the current line, treating any function calls as a single step. | |
| Step Out | When inside a function, executes the function to completion, taking you one level up in the function hierarchy. |
Select the commands and see how the variable values change in the Watch panel. Variables that changed in the most recent debugging step are displayed in red.
Alternatevlie you can debug your .NET objects using Microsoft Visual Studio. See here how to use Visual Studio for creating and debuging scripts.