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

Support "step into targets" in VS Code #288

Closed
luabud opened this issue Jun 12, 2020 · 7 comments
Closed

Support "step into targets" in VS Code #288

luabud opened this issue Jun 12, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@luabud
Copy link
Member

luabud commented Jun 12, 2020

From VS Code's 1.46 update:
https://code.visualstudio.com/updates/v1_46#_step-into-targets

Step Into Targets

Debugging into a statement with many nested function calls can be painful because you might have to step through functions you are not really interested in. To improve this scenario, the Debug Adapter Protocol has supported the "Step Into Target" feature that displays UI for directly stepping into the function you are interested in.

In this milestone, VS Code has started to use this feature. When debugging has stopped on a statement, the context menu shows a new action Step Into Targets. This action presents a list of all targets (typically functions) that are available at the current stack frame. Selecting one of them will step into that target.

Note that every stack frame can have its own set of targets. So the result of the Step Into Targets actions depends on the currently selected frame in the CALL STACK view.

Is that something we can add support to? 😊

@fabioz
Copy link
Collaborator

fabioz commented Jun 12, 2020

Is that something we can add support to? 😊

Yes... seems a nice feature, I'll take a look at that after the issue I'm working on .

@fabioz fabioz self-assigned this Jun 12, 2020
@int19h int19h added the enhancement New feature or request label Jun 16, 2020
@int19h
Copy link
Contributor

int19h commented Jun 16, 2020

Let's think what can be done before going for implementation. I suspect that this would be a very big item, since there's no API in Python to get a list like that - it'd need to parse bytecode, and I'm not sure we can map that back to the specific bits of the original line of code to present a readable list of calls to the user.

@fabioz
Copy link
Collaborator

fabioz commented Jun 17, 2020

Sure... I'll do some investigation first before coding it.

@fabioz
Copy link
Collaborator

fabioz commented Jun 19, 2020

I did some investigation and to parse the bytecode it's really more work to do, so, I was thinking about using the ast module here... The shortcoming from using it is that it won't work in cases where the source code is not available, but I think that for this particular feature this would be a reasonable compromise.

@int19h @karthiknadig do you think it's ok going forward with this approach? I think that it'd take around 5 days to implement.

@int19h
Copy link
Contributor

int19h commented Jun 22, 2020

Bugs are higher priority at the moment. This one is more of a nice to have.

@fabioz
Copy link
Collaborator

fabioz commented Mar 6, 2021

Note: I'm currently working on this.

@fabioz
Copy link
Collaborator

fabioz commented Mar 6, 2021

Related issue in vscode-python: microsoft/vscode-python#13719

fabioz added a commit to fabioz/debugpy that referenced this issue Mar 12, 2021
@fabioz
Copy link
Collaborator

fabioz commented Mar 12, 2021

Note: my plan is to provide a pull request for this next week.

fabioz added a commit to fabioz/debugpy that referenced this issue Mar 12, 2021
fabioz added a commit to fabioz/debugpy that referenced this issue Mar 15, 2021
@fabioz fabioz closed this as completed in 2ebc4e7 Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants