-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug protocol extension: set next statement #28
Comments
@gregg-miskelly What kind of UI would use these requests? |
@weinand in VS, set next statement can be preformed either by dragging the instruction pointer, by right clicking on the line you want to move to and invoking 'Set Next Statement' from the context menu, or from the keyboard with Ctrl+Sift+F10. |
@gregg-miskelly this sounds similar to VS Code's "Run to cursor"? |
@weinand you mean in terms of UI, or in terms of use? In terms of UI - sure. In terms of use - not at all. This is changing where the instruction pointer is, without running any more code in the app. So for example, you step over a function, see that it returned the wrong value, then you can set next statement back to that call and try debugging through it to try and understand what happened. |
@gregg-miskelly so this is 'reverse debugging' or 'back-in-time' debugging? |
@weinand no, its just moving the instruction pointer. Its like if you could add a 'goto line 12' in your program, but without modifying it. |
You can grab a VM with VS on it and give it a try (say with C#). Add a bunch of Console.WriteLine calls and then drag and drop the current IP arrow. |
I find this feature very helpful when working with C# code in VS, and would love to see it supported. I agree that this would have to be gated as a Capability since not all debuggers will support this. Specifically, Chrome's V8 inspector protocol and other the JavaScript debug protocols I am familiar with do not support this type of operation natively. |
Ok, I think I get it now: this is really like a 'goto' which means you can run through a program in a way that is impossible in normal execution. This seems only available in VS and only for C# and C++. Coming from an Eclipse background the closest thing I've seen there is 'drop to frame'. So this seems to be very specific to VS. |
I believe there are other IDEs with it, and certainly other runtimes, but yup, it is missing from Eclipse, Java and Chrome, and yup, 'drop to frame' is the closet that they provide. |
@gregg-miskelly @jacdavis @DavidKarlas I've created a proposal for this protocol addition as PR 45. Please review and comment. |
Any news about feature? |
This protocol feature was finished in July 2016. |
@verysimplenick please file an issue against VS Code. This item here is just about the protocol (which is independent from VS Code). |
To be able to use the debug protocol in other IDEs (Visual Studio, Xamarin Studio) or VS Code in the future we should think about how the debug protocol should support set next statement.
To make this work well with VS without an impedance mismatch, we need this to be two different requests - one to find the code locations associated with a source line and another to set next statement to one of those. Something like:
We also likely want a new capability.
The text was updated successfully, but these errors were encountered: