Skip to content

Allow skipping certain files while debugging #3725

Open

Description

I'm working with c++ and it would be very helpful if there was a way to skip library files while debugging.

Activity

  1. pieandcakes commented on Jun 4, 2019

    @pieandcakes
    Contributor

    Can you clarify what you mean by "skip library files" while debugging? Are you saying don't load the symbols?

  2. tejasvi commented on Jun 5, 2019

    @tejasvi
    Author

    I mean to not show standard headers while stepping into an operation. It gets tedious with each minor operation like a variable declaration. An alternative could be to step over but it not plays well with recursive code.

  3. pieandcakes commented on Jun 5, 2019

    @pieandcakes
    Contributor

    Tejasvi S. Tomar (@tejasvi) The problem is there does not exist a mechanism within the debugger for us to tell it not to send us frames which are not in your code. I would suggest a workaround of setting a breakpoint in code you want to debug and run to those points using F5.

  4. tejasvi commented on Jun 6, 2019

    @tejasvi
    Author

    So is the feature more suited for vscode?

  5. pieandcakes commented on Jun 6, 2019

    @pieandcakes
    Contributor

    Tejasvi S. Tomar (@tejasvi) The feature needs to exist in the debugger (gdb, lldb etc) for us to be able to leverage it.

  6. tejasvi commented on Jun 7, 2019

    @tejasvi
    Author

    In that case, gdb allows to skip certain files given their location. However, there is no way to specify using directories. But it is theoretically possible for vscode to not show the header and give an artificial step-into command to the debugger. Am I missing something?

  7. pieandcakes commented on Jun 7, 2019

    @pieandcakes
    Contributor

    Thanks for pointing that out as I didn't know about the skip feature. The problem from our side is being able to determine whether or not the user wants to skip the code such as in the case of a user defined lib versus a std lib that are outside the workspace. I think if it was something the users could configure that would be great.

    Tejasvi S. Tomar (@tejasvi) if you can try it by setting the option in setupCommands with the correct skip <options> and see if that works that would work for your case. If it does, we can provide a documented guidance to users so they can configure their debugging session.

  8. tionebrr commented on Jun 11, 2019

    @tionebrr

    Yes please ! A documented guidance would be absolutely great.
    Following.

  9. mrx23dot commented on Jul 11, 2024

    @mrx23dot

    To list what files were have code for
    gdb:

    info sources
    info files
    

    Then we can compare them to files in project workspace (by normalised full abs path)
    then skip all functions in the other files:

    skip file /path/to/your/file1.c
    skip file /path/to/your/file2.c
    skip file /path/to/your/other_directory/*
    

    We could have an option to only debug files in workspace. (skip external libraries)
    Note, not all debuggers will support this.

  10. StephenApptronik commented on Feb 13, 2025

    @StephenApptronik

    Duplicate of this request: #5763
    The other one has over 150 upvotes.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions