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

Feedback on "Jump to Cursor" feature #9947

Closed
luabud opened this issue Feb 6, 2020 · 9 comments
Closed

Feedback on "Jump to Cursor" feature #9947

luabud opened this issue Feb 6, 2020 · 9 comments
Labels
area-debugging feature-request Request for new features or functionality

Comments

@luabud
Copy link
Member

luabud commented Feb 6, 2020

This issue is meant for gathering feedback around the "Jump to Cursor" feature.

  • Can its name be more descriptive?
  • Is there a way we can make it more discoverable?
@luabud luabud added feature-request Request for new features or functionality area-debugging needs decision triage-needed Needs assignment to the proper sub-team labels Feb 6, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Feb 6, 2020
@jahan01
Copy link

jahan01 commented Feb 12, 2020

Its head line worthy feature, but yet it was released unannounced. I would like to know how does it go back in time to already executed expressions?

@luabud
Copy link
Member Author

luabud commented Feb 12, 2020

Hi @jahan01! It doesn't actually go back in time in the sense that it doesn't restore previous states. It really just defines the next point that the debugger will execute. If you set it to execute a piece of code that the debugger had already past through (by right clicking the editor on the line you wish to execute and selecting "Jump to Cursor"), all it will do is execute the code starting from that line, without changing its current state.

@bersbersbers
Copy link

Since you ask:

Did you know about this feature before this blog post?

I have been asking for this more than two years ago, and stopped hoping it would ever arrive. I had no idea it's implemented. I love it.

Do you think its name can be improved to better indicate its behaviour?

I like "Set Next Statement", which I believe I have been knowing under this name since 2009 in Visual Studio doing C# development:
https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2019#BKMK_Set_the_next_statement_to_execute

It's also under this name that this feature is requested heavily (and/or provided) for various languages:
VS Code: microsoft/vscode#12514
VS Code: https://stackoverflow.com/questions/51552833/is-there-something-similar-to-set-next-statement-available-in-visual-studio-co
C#: dotnet/vscode-csharp#2785
C++: microsoft/vscode-cpptools#1025
C++: https://marketplace.visualstudio.com/items?itemName=ntoskrnl7.cxx-set-next-statement-extension
PTVSD: microsoft/ptvsd#18

@luabud luabud added needs proposal Need to make some design decisions and removed needs decision labels Feb 14, 2020
@luabud
Copy link
Member Author

luabud commented Feb 14, 2020

Thank you for the feedback, @bersbersbers! That's a very good point, renaming it to "Set Next Statement" would be more consistent. I added this suggestion to issue #9875 and will talk to the team about it. 😊

@gilescope
Copy link

+1 for Set Next Statement. Jump to Cursor sounds like an editor thing. I was just searching around to figure out what Set Next Statement was called and stumbled on this ticket :-)

@gilescope
Copy link

Also I notice Alt-V isn't used at the moment as a key binding. If you think of 'pasting' the instruction pointer as setting it... felt nice to me anyway.

@luabud
Copy link
Member Author

luabud commented Mar 11, 2020

That's great feedback @gilescope, and a very good point as to why we should really rename it. Thank you 😊

Interesting that you mention Alt+V. When I use it in VS Code, it opens the "View" menu. This is nice in terms of accessibility, so I'd be a bit concerned of overriding it for set next statement command. But these are all great things for me to bring up to the team.

@luabud
Copy link
Member Author

luabud commented Apr 7, 2020

Just to give an update, the VS Code team is looking into adding "set next statement" as an alias to the "Jump to Cursor" command, so that it will show in the command palette when searching for "set next statement" 😊

@luabud
Copy link
Member Author

luabud commented Aug 18, 2020

The alias was added in the June 2020 version of VS Code 🥳

@luabud luabud closed this as completed Aug 18, 2020
@ghost ghost removed the needs proposal Need to make some design decisions label Aug 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants