How do I "automate" this pressing of F11 in vscode debugger, so that i can just watch few variables changing? - vscode-debugger

How to have "Step into" run automatically with 1 second gap between each line of the code .
I want to review a big python codebase that have to review.

Related

VSCode: How to Step Over

I have VSCode Windows and Microsoft Python extension installed.
By pressing F5, the IDE just executes my code immediately. I don't get the chance to choose if I want to run the code or to use debugging features like step-over or step-into. The debugging menu bar appears on top and disappears very quickly.
In some tutorial videos I see that pressing F5 actually brings up that menu bar. Then the developer has to choose to run the program or step it. I want the same thing.
Please assist.
so first you have to add a breakpoint in which the debugger will pause at the line of code. You can add the breakpoint by pressing f9 in the same line of the code. After that, you can press f5 to debug the code and later on press f10 to step over!

Visual studio start line by line debugging in the middle of a program

I am working on a program and a lot of the buttons and menu items are dynamically created. Its especially hard to work on because I don't know where they are created and assigned to. It would help if I could start up the program via debugger, get to the menu, then switch to "line by line" style debugging like pressing F10, where the next line of code ran would break, and then press one of the buttons to get more info about it once the break happens. Is there any way I can do this in visual studio?
In Visual Studio, you have the Solution Explorer. There you see the Project files, they are under the top level Solution. If you right click on your main project, go to: Debug > Step Into New Instance.
If you work on a .NET application, you can use my Runtime Flow tool to see what code is executed when you select a menu item or press a button.
The closest way I could figure out how to do this is to go into Debug>Disable All Breakpoints and then when I get to where I need to be in the program go back and Enable All Breakpoints. Of course this only works if there is a large number of breakpoints in places in the program.

Is there any way to check currently executing code in visual studio?

I've been working on a C# project and I don't know the program flow. I want to know all the executing codes in a particular flow. I can press the pause button to check current executing code, but to check entire flow, I need to keep on pressing F11 or next line, which is cumbersome. BTW, I got it from here
Find out what line of code my app is currently running in Visual Studio's debug mode
I would like to know is there any way in visual studio to check currently executing code without pausing or placing break points?
I often use the VS debugging breakpoint or debug menu options like "Step Into/Out" or use the pausing button.
But if you don't want to use them, the Runtime Flow tool is a workaround I know which can help you see code that is executed:
Find out which line will be executed in Visual Studio debug mode
A feature request for VS IDE:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17332198-is-there-any-way-to-check-currently-executing-code
In VS2017, debug has a new feature called "Run execution to here", I know that it doesn't really meet your requirement, but it is a better workaround if you don't want to step Into debugging one step by one step. Move your mouse to the icon and click the button, now your code will run and stop on that line the next time it is hit in your code path.
If you want this ability at debug time then consider IntelliTrace
ReSharper has a Call Tracking feature that can display incoming and outgoing calls sequenced in an interactive, graphical tree view.
See if this helps.
The issue here is that there is code running but you don't know where and you want to see what is going on. A good example is the code is stuck in a loop somewhere but you don't know where.
To break-into the running code:
Option 1: Select the 'Debug' menu item, and then select the 'Break All' menu item.
Option 2: Press keys Ctrl+Alt+Break.
This will break into the code where it is executing and you will step into debugging just as if you hit a breakpoint.
Happy debugging!

Find out which line will be executed in Visual Studio debug mode

How can I find out which line will be executed after performing any action?
If I know what will be executed I can put break point there. But what if I am not sure where to set breakpoint or just I need to go to the executing line faster (without setting breakpoints).
"Break All" is not what I look for. It is pausing debugging, so I cannot perform any action (just after which I want Visual Studio sets breakpoint automatically)
In other words, for example I want to start debugging each line after clicking a button, without putting breakpoints. Is it possibile?
For a .NET application you can use my Runtime Flow tool (30-day trial) to see code that is executed after some action.
Set a breakpoint at the line you want to stop after. Then once the breakpoint is hit Step Into or press F11 in Visual Studio. This takes you to the very next line of code that executes, no matter where it is in the project.

Re-run a line of code during matlab debugging like Visual Studio?

Is there a possibility to re-run already executed line in matlab like Visual Studio. In Visual Studio, one can set the next line for execution in debug mode. Does matlab have this feature?
Not perfectly sure whether this is what you are looking for, but you can highlight some code with your mouse and then press F9 (note that this is the Windows shortcut, not sure whether linux or OSX are the same). The highlighted code will then be executed, this feature is called "evaluate selection".
I am not aware that you can interfere with the order of code execution in MATLAB in another way (except typing stuff in the command line while debugging).
Warning:
As suggested by Dan in the comment, note must be taken that this will alter the workspace and naturally this can interfere with the execution of your program in undesireable and at first unintuitive ways. You should keep this in the back of your head at all times while altering the workspace during program execution.

Resources