You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Andre Weinand (@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.
Andre Weinand (@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.
Andre Weinand (@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.
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.
Activity
weinand commentedon Jun 8, 2016
Gregg Miskelly (@gregg-miskelly) What kind of UI would use these requests?
gregg-miskelly commentedon Jun 8, 2016
Andre Weinand (@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.
weinand commentedon Jun 8, 2016
Gregg Miskelly (@gregg-miskelly) this sounds similar to VS Code's "Run to cursor"?
gregg-miskelly commentedon Jun 8, 2016
Andre Weinand (@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.
weinand commentedon Jun 8, 2016
Gregg Miskelly (@gregg-miskelly) so this is 'reverse debugging' or 'back-in-time' debugging?
gregg-miskelly commentedon Jun 8, 2016
Andre Weinand (@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.
gregg-miskelly commentedon Jun 8, 2016
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.
mjbvz commentedon Jun 8, 2016
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.
weinand commentedon Jun 8, 2016
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.
gregg-miskelly commentedon Jun 8, 2016
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.
Proposed protocol addition "set-next-statement" #28
weinand commentedon Jul 18, 2016
Gregg Miskelly (@gregg-miskelly) Jackson Davis (@jacdavis) David Karlaš (@DavidKarlas)
I've created a proposal for this protocol addition as PR 45.
Please review and comment.
add support for gotoTargets; see #28
verysimplenick commentedon Aug 7, 2017
Any news about feature?
weinand commentedon Aug 7, 2017
This protocol feature was finished in July 2016.
verysimplenick commentedon Aug 7, 2017
Andre Weinand (@weinand) maybe you know about implementing this protocol feature in vs code?
Because OmniSharp just links to this work item.
weinand commentedon Aug 7, 2017
bot (@verysimplenick) please file an issue against VS Code. This item here is just about the protocol (which is independent from VS Code).