Skip to content

If workspaceFolder is specified in launch request, use it to force user code location #581

Closed

Description

@fabioz

One thing that happens sometimes is that the user places its own code inside a site-packages.

In this case the debugger may end up ignoring user code as it's defined in a library folder when justMyCode:true. The idea would be that if workspaceFolder is passed on the launch request, its contents would be treated as user code.

Activity

  1. int19h commented on Apr 21, 2021

    @int19h
    Contributor

    Hm, but then we'll also be treating any virtual environments in that folder as user code, including any third-party packages installed in them?

  2. fabioz commented on Jun 4, 2021

    @fabioz
    CollaboratorAuthor

    The debugger should be able to deal with cases where there's a structure as:

    /user_code
    /user_code/library_code
    /user_code/library_code/user_code
    

    (the particular code is: https://github.com/microsoft/debugpy/blob/v1.3.0/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py#L298)

    So, that should still work...

    Still, I haven't seen more reports lately on users not being able to debug due to having user code inside the site packages (probably more people are now aware they need to set "justMyCode":false to debug in that case and that structure is already not that common I think), so, not sure if we should do this or just leave at the current status quo...

  3. int19h commented on Feb 1, 2023

    @int19h
    Contributor

    No traction on this to date; closing until we decide we actually need it.

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