Skip to content

Allow explicitly mark paths as library to exclude from 'justMyCode' #1914

Open

Description

@dobos

Here's the situation: I'm debugging some Python code that relies on third-party libraries. The third-party libraries (unfortunately) are installed by a non-standard package manager and are under some subdirectory in the ./shared folder of the conda env. I'm trying to debug unit tests but the debugger constantly breaks into the third-party library on certain exceptions when the 'User Uncaught Exceptions' option is ticked. The exception in the third-party lib are actually handled by the standard lib somewhere so they never bubble up to my code, yet the debugger breaks every time. This is very annoying because I only want to break into the debugger on exception raised from my own code. I've tries setting PYDEVD_FILTERS and LIBRARY_ROOTS, that I found in the source code but neither worked.

Activity

  1. rchiodo commented on Jun 24, 2025

    @rchiodo
    Contributor

    Maybe if you added those paths to the PYTHONPATH variable? That might make pydevd consider them third party.

  2. rchiodo commented on Jun 24, 2025

    @rchiodo
    Contributor

    Otherwise, the rules as documented in the other issue should work.

  3. dobos commented on Jun 25, 2025

    @dobos
    Author

    Maybe if you added those paths to the PYTHONPATH variable? That might make pydevd consider them third party.

    They're added to PYTHONPATH, that's how the third-party package manager works. Actually, when you develop a Python module, you have to add your own module to PYTHONPATH as well, so that's not a good way of making a distinction.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions