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

Step into specific ability #2488

Open
sean-mcmanus opened this issue Sep 6, 2018 · 8 comments
Open

Step into specific ability #2488

sean-mcmanus opened this issue Sep 6, 2018 · 8 comments

Comments

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Sep 6, 2018

Debugging with VS allows "Step into specific", which is useful when the currently line has a bunch of contructors/conversions that get invoked for parameters to a function (e.g. shared_ptr move constructors), so "Step into specific" enables stepping into the actual method that is desired.

Using Go to Def and setting a breakpoint in the definition is sometimes a workaround (versus a bunch of step in/outs).

@Trass3r
Copy link

Trass3r commented Jul 16, 2021

Seems like compiler support is required for this.
https://sourceware.org/bugzilla/show_bug.cgi?id=26355#c1

@MiKom
Copy link

MiKom commented Jul 16, 2021

@Trass3r Didn't know gdb and DWARF don't support that. Thanks for the link.

That said, If there's at least one debugger that supports it (VS debugger) it would probably still make sense to have the machinery on the VSCode side. Once gdb catches up, the client-side bits will already be in place.

@Trass3r
Copy link

Trass3r commented Jun 3, 2022

Some old WIP code for it: https://github.com/Trass3r/MIEngine/commits/StepInTargets

@bselu-cso
Copy link

How about at least defining some sort of blacklist of function names you don't want to step into? That way you could at least avoid stepping into every std::move(), std::unique_ptr(), etc.

This could save of a lot of debugging pain.

@Trass3r
Copy link

Trass3r commented Feb 6, 2023

Fwiw you can do that on the debugger level.
https://sourceware.org/gdb/download/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html

@bselu-cso
Copy link

Thanks fot the hint, that was very valuable to me. 👍

How about adding some GUI-support to the VSCode plugin so the user can choose functions / files to be skipped during debugging. A list of skipped stuff (just like there is a list for breakpoints) could be managed in a seperate window.

Technically for each item on this list a GDB command is sent to the debugger on startup (or on the fly while running). In theory this could also go to a custom gdbinit-file, if that makes things easier.

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

4 participants