'How to move the debug pointer to change the execution flow in Visual Studio Code Debugger
I have used Visual Studio 2008 to 2017, all having this feature as shown below:
The yellow arrow(debug pointer) which can be used to manipulate executing line(or execution flow) while debugging, thus allowing the user to move the arrow simply by using mouse.
In Visual Studio Code, the arrow is there to show the executing line as shown below:
But it(debug pointer) can't be manipulated or moved using mouse, to change the executing line(or execution flow) while debugging.
Is there any setting which has to be changed in Visual Studio Code to enable this feature?
Solution 1:[1]
Right click on the line you want to run in the start position, and "jump to cursor".
Solution 2:[2]
You are looking for Set Next Statement
option, which is not yet available.
Please follow this Git Issue for latest.
Solution 3:[3]
There is no as such feature available as per the documentation. Check here on official link
Solution 4:[4]
Given answer "Jump To Line" maybe the answer, but as a workaround I use debug console. I run the needed line over there, by copy/paste, so i can manipulate variables.(if the functions are not async)
Solution 5:[5]
Inside VsCode, go to 'File=>Preferences=>Keyboard Shortcuts' Ctrl+K, Ctrl+S in my VsCode opens this dialogue
Now type: 'set next statement' as the Command to search for inside keyboard shortcuts. Click inside to set a shortcut key,such as 'Ctrl+Shift+F10'
Now you can just select another line when debugging (statement actually) and hit they shortcut you just set up such as 'Ctrl+shift+f10'. Very keyboard friendly and a good alternative until there is a VsCode version where you can do as in Visual Studio, just drag and drop the 'breakpoint indicator' to the left of the editor up or down. I guess VsCode probably will implement this sooner or later..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Arun Vinoth - MVP |
Solution 3 | Harit Kumar |
Solution 4 | sabotajj |
Solution 5 | Tore Aurstad |