Skip to content
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

Feature request: Add "supportsGotoTargetsRequest" capability #84

Open
nickspoons opened this issue Mar 9, 2022 · 3 comments
Open

Feature request: Add "supportsGotoTargetsRequest" capability #84

nickspoons opened this issue Mar 9, 2022 · 3 comments

Comments

@nickspoons
Copy link

Adding the "supportsGotoTargetsRequest" would allow skipping/repeating sections of code, as one can by dragging the debugger location icon in Visual Studio.

https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Goto

@alpencolt
Copy link
Contributor

For connection to Visual Studio we use MI protocol and it doesn't has such command. VSCode protocol is used for connection with VSCode but I cannot find how to use this functionality from IDE. Probably it's also may require changes in runtime since no one checked this logic on Linux.

BTW @nickspoons what is the user scenario of this feature? Skipping of code blocks will cause inconsistent stack state and incorrect application work.

@nickspoons
Copy link
Author

The use case is to explore the code. In Visual Studio, for example, I might accidentally step over a method when I meant to step into it, and in VS I can drag the current point of execution back to the method and then step into it. Yes this can indeed cause the application to work incorrectly, that's a decision I've taken while I'm working in the debugger.

Another use case could be a fragment of code that writes some changes to a database, but I don't want the changes written while I'm debugging so I skip over those steps and continue debugging.

There are many ways I've used this in Visual Studio. I currently use this debugger from Vim using the vimspector plugin, which currently does not support this capability, but if it was supported by netcoredbg I could look into implementing it in vimspector.

I have no idea if vscode has a way of using this capability. I would have thought so, since it seems like vscode has driven a lot of the LSP development, but perhaps not. In any case, it's part of the spec so I thought it would be worth opening an issue for it.

@alpencolt
Copy link
Contributor

I see, it might be useful. MI engine which we use for communication with Visual Studio has support in latest releases microsoft/MIEngine#1042.
May be we'll implement it in next releases, keep this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants