Author |
Topic ![Next Topic Next Topic](icon_go_right.png) |
|
Bejoscha
New Member
![](icon_star_green.gif)
Germany
7 Posts |
Posted - Feb 02 2024 : 03:41:38 AM
|
During debugging, I quite often set a break-point before some testing code and then - once it is hit - manually drag the yellow thread-marker to a position after the test-code (i.e. skip certain lines) before continuing.
It would be great to have some functionality here that wouldn't involve using the mouse and is short-key based. I could imagine two things:
1) a "continue here" short-key that operates on the line the cursor is currently in
2) a "skip over next statement" short-key that acts as if the yellow thread-marker would have been dragged one line (or next logical unit) down, so that "next step" and "skip step" could be used as needed.
|
|
feline
Whole Tomato Software
![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif)
United Kingdom
18915 Posts |
Posted - Feb 05 2024 : 09:46:22 AM
|
Can you try moving to the line you want the arrow on and press F10. For me, this is mapped to the keyboard shortcut:
Debug.SetNextStatement
but you might have this mapped to a different command, or need to map this. |
zen is the art of being at one with the two'ness |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
Bejoscha
New Member
![](icon_star_green.gif)
Germany
7 Posts |
Posted - Feb 06 2024 : 03:02:37 AM
|
Thank you! I was not aware of Debug.SetNextStatement. It was mapped to SHIFT+CTRL+F10 for me (F10 being just "next step" in debugging). This certainly is an improvement over mouse-dragging and fullfills #1. I still thing #2 would be the more convenient way to go. Imagine it being mapped to, say, F11. Then one could simply go F10 to execute the next step, and F11 to skip the next step, very quickly stepping through. |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
feline
Whole Tomato Software
![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif)
United Kingdom
18915 Posts |
Posted - Feb 06 2024 : 09:25:33 AM
|
At the risk of asking a stupid question, isn't that basically the same as stepping over with the debugger? I know you are looking to avoid executing the test code, but stepping forward is a normal debugging step, and avoids any risks caused by moving the execution point around without actually executing the skipped over code. |
zen is the art of being at one with the two'ness |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
Bejoscha
New Member
![](icon_star_green.gif)
Germany
7 Posts |
Posted - Feb 06 2024 : 1:42:46 PM
|
In debugging I do end up in situations where I need to test how running/avoiding certain code-paths impacts the outcome, and while there are of course workarounds like inserting debugging-variables, changing the debugger with SetNextStatement or mouse is for sure often faster and more convenient. In the end, it's all a matter of workflow convenience and learning the SHIFT+CTRL+F10 today already helps a big deal, not needing the mouse. :c) |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
feline
Whole Tomato Software
![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif) ![](icon_star_red.gif)
United Kingdom
18915 Posts |
Posted - Feb 07 2024 : 05:58:24 AM
|
Depending on how your code is structured, VA's Next and Previous scope might be quite helpful here. If you are not familiar with these, you can use Alt+Up Arrow and Alt+Down Arrow to move to the top or bottom of the current scope block.
So, assuming you have something like this:
void DebuggingThis()
{
ActivityOne();
if(ActivityTwo())
{
DebugLogging();
MoreDebugLogging();
}
ActivityThree();
} Next and Previous scope are ideal for jumping through the if block quickly and easily, similar to using CTRL+] to jump to the matching open or close bracket, but without having to first navigate to one of the brackets.
Bookmarks or VA Hashtags can also be very helpful for marking points you want to quickly and easily jump to, before and after the debugging code, so you can then set the execution point to the current cursor location.
If we already have the tools to make this even easier then this gets you up and running today, rather than putting in a feature request that may not happen for quite some time. |
zen is the art of being at one with the two'ness |
![Go to Top of Page Go to Top of Page](icon_go_up.png) |
|
|
Topic ![Next Topic Next Topic](icon_go_right.png) |
|