I have really struggled with writing a particular script. It was not obvious why it was not working properly. I would have much appreciated the following:
1. A way of slowing down the code execution only if the script was run from within the editor, and in that mode the cursor moves down the script as it proceeds to run. This is important because the F8 step can not always be used to debug all of a program because even with version 8 the focus gets lost and the manual refocusing by clicking the mouse makes it difficult to know if there is a problem at that point.
2. A list of open windows as the script runs.
3. Button to run script from beginning an opposed to where the cursor has stopped.
4. A built in function to list all the files in a directory and its subs. I am aware that it can be done with extra code from within MS, but it would be much easier as an extension of the getfilelist function.
Debugging Ideas
Moderators: Dorian (MJT support), JRL
Some more ideas:
1. Have the ability to continue at full speed after a breakpoint.
2. let two breakpoints in a script mean that debug mode starts at the first and stops at the second with the script continuing normally.
3. Prevent the scriptr from being changed if the script is being run in debug mode. I have found the script can be added to by a command if the focus goes to the editor rather than the program being run. Set focus does not always stop this in debug mode.
4. Have the list of windows proposed in my earlier posting be only those windows opening since the starting of MS and have the option to restrict the windows to those that are sent to the screen. Also allow only those windows being opened by specified programs. I have over 1400 windows open and it is difficult to spot what is new and what it relates to.
1. Have the ability to continue at full speed after a breakpoint.
2. let two breakpoints in a script mean that debug mode starts at the first and stops at the second with the script continuing normally.
3. Prevent the scriptr from being changed if the script is being run in debug mode. I have found the script can be added to by a command if the focus goes to the editor rather than the program being run. Set focus does not always stop this in debug mode.
4. Have the list of windows proposed in my earlier posting be only those windows opening since the starting of MS and have the option to restrict the windows to those that are sent to the screen. Also allow only those windows being opened by specified programs. I have over 1400 windows open and it is difficult to spot what is new and what it relates to.
Robin
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Debugging Ideas
This functionality already exists. It's called Trace. You can set it to trace with 1 second multiple delays. So it can run each line every second, every two seconds ... whatever. Do Debug/TraceRobbyn wrote:1. A way of slowing down the code execution only if the script was run from within the editor, and in that mode the cursor moves down the script as it proceeds to run. This is important because the F8 step can not always be used to debug all of a program because even with version 8 the focus gets lost and the manual refocusing by clicking the mouse makes it difficult to know if there is a problem at that point.
You can leave View System Windows open while debugging. Although you'd have to refresh it at intervals. Great idea for a future version.2. A list of open windows as the script runs.
Ok, but all it would do is move cursor to start of script. You could do this anyway.3. Button to run script from beginning an opposed to where the cursor has stopped.
Agree that would be nice. Will add to wish list.4. A built in function to list all the files in a directory and its subs. I am aware that it can be done with extra code from within MS, but it would be much easier as an extension of the getfilelist function.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Great ideas. Thanks.Robbyn wrote:Some more ideas:
1. Have the ability to continue at full speed after a breakpoint.
2. let two breakpoints in a script mean that debug mode starts at the first and stops at the second with the script continuing normally.
3. Prevent the scriptr from being changed if the script is being run in debug mode. I have found the script can be added to by a command if the focus goes to the editor rather than the program being run. Set focus does not always stop this in debug mode.
4. Have the list of windows proposed in my earlier posting be only those windows opening since the starting of MS and have the option to restrict the windows to those that are sent to the screen. Also allow only those windows being opened by specified programs. I have over 1400 windows open and it is difficult to spot what is new and what it relates to.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
I am aware of trace but in my version of MS the cursor does not track the lines of the program. I have been doing:Robbyn wrote:
1. A way of slowing down the code execution only if the script was run from within the editor, and in that mode the cursor moves down the script as it proceeds to run. This is important because the F8 step can not always be used to debug all of a program because even with version 8 the focus gets lost and the manual refocusing by clicking the mouse makes it difficult to know if there is a problem at that point.
This functionality already exists. It's called Trace. You can set it to trace with 1 second multiple delays. So it can run each line every second, every two seconds ... whatever. Do Debug/Trace
1. Debug->trace->go
2. Run
When I do that the cursor does not move so I can not see which line is being executed.
Robin