Step through debugging

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
rnoecker
Junior Coder
Posts: 25
Joined: Fri Jun 07, 2013 4:44 pm

Step through debugging

Post by rnoecker » Wed Jul 03, 2013 2:24 pm

The step through debugger stops on every line whether it is a blank line or a comment. This process is already slow enough without stopping on lines that don't result in execution.

A bit more complicated, but it would also be nice to reset the position. If I am testing a block of code I may need to keep resetting back to the top of that code. It is acceptable to start and stop the script, but it gets more time consuming if there is code before that block that needs to run each time (ex. initialization of variables at the top of the script).

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Thu Jul 04, 2013 1:51 am

Hi rnoecker,

Insert a break point, then you run the script normally, will run all the way though until it reaches that break point, then you step though the rest of the script.

Or use trace. They are both in the menu at the top of the editor.
Insert Breakpoint
Inserts a breakpoint after the selected line. Simply inserts **BREAKPOINT** on the next line. If running the script using 'Run' from the Debug menu, execution will pause when this Breakpoint line is reached and the script can then be stepped from this point. As of version 10 multiple breakpoints can be set. At any time pressing Run will run the script to the next breakpoint from where the script can again be stepped or run.

Variable Breakpoints
Allows you to set one or more variable values on which script execution to break. Specify name=value pairs. E.g. to make the debugger pause when X=5 enter X=5 in the list. Then, when you run the script execution will pause when X=5 no matter where that happens. The script can then be stepped or continued from this point.

Run From Top
With this item enabled the script will always be run from the first line when it is started. With this option unchecked the script will be started from the line containing the cursor. This can be useful when debugging scripts and you only want to run a section of code.
FIREFIGHTER

rnoecker
Junior Coder
Posts: 25
Joined: Fri Jun 07, 2013 4:44 pm

Post by rnoecker » Mon Jul 08, 2013 5:57 am

When debugging a particular section it can be time consuming to run the entire script up to that breakpoint (ex. if it takes 5 minutes to get the application in the appropriate state). I don't see how those techniques resolve the issue of only wanting to run a section at the top (ex. variable initializers) and then step over an arbitrary number of lines of code to get to the section to be debugged.

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Mon Jul 08, 2013 6:46 am

Maybe do what I do, have those variable initializers in a sub routine. Then when testing the code / stepping though it you can just add 1x line (GoSub>InitiateVar).
FIREFIGHTER

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts