The Debugger is a powerful Trading Blox Builder tool for verifying and understanding blox scripts. When it is invoked, the Debugger can check each script line in each blox. Its checking process can show each script and display the script information values in the data list on the right side of the debugger display.
To invoke the debugger, enter a beak point on one or more of the location where you wish to see the line by line display of script information. When break point are created, close the Blox Basic Editor and run a test where the blox with the break points are included. When the test execution reaches a break point, it will stop the execution and display the break point information. To continue to the next line of script, press F11 and the debugging highlighter will move to the next line in the display script section.
line of the script information is working and changing one line at a time, or only in the sections where a break point is active. This is possible because the debugger exposes the variables and their values in the blox being stepped. Debugging follows the logic of the system and displays the information for both types of script context. As the script lines step through the blox, the information exposes how each script line analyzed, at the end, it proves an understand of how that blox is designed. With this understanding, you will be able to know if the blox scripts are doing what you need to happen before and after you make changes to the blox.
Break points create location that will halt the test execution of a system. Each break point creates one halting location. There can be many break points in a blox. When a break point halts the processing, it will exposed the values in the various types of variables and parameters in tables that can be scrolled.
Break Points can be created by clicking on the line of a script displayed in the Blox Basic Editor and pressing F9. When a break point is created it will create light-red color background of the line where the cursor is location.
Block Basic Editor's Breakpoint Indicator
Pressing F9 on a line where a break point is display will remove a break point during Blox Basic Editing display. When F9 is used tp create a break point, the break point type that will be create will be the default break point that will stop execution in the debugger using the "All Instruments - break on every instrument" option. To remove a break point, press F9 again when the cursor is on the same line as the displayed break point.
Trading Blox Builder can create other types of break points when they are created using the Break Point Editor. These optional break points can be more selective in how they stop a debugging test allowing for less test-interruptions when you are trying to see what is happening for a specific instrument, or when it appears to be date related.
All break points can be cleared using the Clear Breakpoints button. When you set a breakpoint in this manner, the default is to break on every instrument on every day.
Break points are only active during a single step test. All break points are disabled during a multiple- step.
Move Editor Information to Break Point Editor Topic
If your breakpoint gets hit during the execution of the system, you will see a debugger window which shows you all the local, global, and object variables available to that script. It is useful in determining whether things are operating normally.
The debugger includes several different buttons on the toolbar which aid you in making sure that your code is doing what you intended. Starting from left to right we have:
The Run button runs the script.
The Stop button stops a script that is being debugged, terminating its execution.
The Breakpoint button toggles a breakpoint at the current line.
Use F11 to step from one line to the next.
You can also set or edit a breakpoint by double clicking on the line number. The line number is the number just in front of each line of code in your script. When you set or edit the breakpoint this way, you have more options.
You can break for all instruments or a single instrument. To enter a single instrument use the symbol. For Soybeans the symbol would be S. Use upper case. Indicate the Instrument Type, whether it is a future, stock, or forex.
You can also filter by date:
oAll Dates: Break every time
oExact Date: Breaks only on date entered (enter in format YYYYMMDD e.g. 20050704 for July 4, 2004)
oDate Range: Breaks on dates between the two dates entered
Edit Time: 9/25/2017 09:09:54 AM
Topic ID#: 400