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

Move instruction pointer while debugging #2291

Closed
gottfired opened this issue Jun 13, 2022 · 4 comments
Closed

Move instruction pointer while debugging #2291

gottfired opened this issue Jun 13, 2022 · 4 comments
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@gottfired
Copy link

Describe the solution you'd like
It would be great, if you could move the instruction pointer during debugging like in other languages/IDEs

Additional context
This is possible e.g. with C++ in Visual Studio or Swift in XCode

@gopherbot gopherbot added this to the Untriaged milestone Jun 13, 2022
@suzmue
Copy link
Contributor

suzmue commented Jun 13, 2022

Hi @gottfired! Could you provide some more details about what you would like to see? How do these other languages allow moving the instruction pointer?

@suzmue suzmue added Debug Issues related to the debugging functionality of the extension. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jun 13, 2022
@gottfired
Copy link
Author

gottfired commented Jun 14, 2022

In Xcode and Visual Studio (not Visual Studio Code) you can drag the instruction pointer (ie. the arrow indicating you current point of execution) to a new position.

Screenshot 2022-06-14 at 12 30 29

This simply sets the point where program flow will continue execution, so basically the next ASM instruction. When you drag back it does not roll back any changed data or other side effects. But in many cases this is quite useful, e.g. when debugging an algorithm and you want to rerun a loop you can simply have a breakpoint after a loop and drag back to the beginning, or if you accidentally skip going into a function you can drag back to the point before. In the screen shot above I could e.g. drag directly to the assert, skipping the two lines in between. Or I could put a breakpoint at the assert and drag back to the start of the function.

@hyangah
Copy link
Contributor

hyangah commented Jun 14, 2022

For UI/UX, DAP has supportsGotoTargetsRequest
but this is more about Delve's capability and Go's runtime support if needed.

go-delve/delve#1045 discusses this topic in the delve project.

@aarzilli's initial assessment go-delve/delve#1045 (comment) was written in 2017, and Go's compiler/runtime had been changed a lot since then. So I don't know if how many more or less constraints were added to the list.

@suzmue
Copy link
Contributor

suzmue commented Jun 16, 2022

Closing this as there is not support in Delve and the Go runtime, so there is nothing for the extension to do.

@suzmue suzmue closed this as completed Jun 16, 2022
@golang golang locked and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants