Skip to content

Add support for path mapping for remote debugging #1289

Closed
@DonJayamanne

Description

@DonJayamanne

In the current version of the debugger we have the ability to map just two paths:

        {
            "name": "Attach",
            "type": "pythonExperimental",
            "request": "attach",
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "${workspaceFolder}",
            "port": 9091,
            "host": "157.54.167.255"
        }

However the new debugger has the ability to map multiple paths.
I can see this being used when debugging std libs.
I.e. we'd need to map paths in workspace as well as paths in the interpreter.

My suggestion is to leave the existing path mapping as is, but introduce an additional property for more path mappings as follows.
@brettcannon What do you think about this approach?

        {
            "name": "Attach",
            "type": "pythonExperimental",
            "request": "attach",
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "${workspaceFolder}",
             "pathMappings": [
                    { "localRoot": "C:\\Program Files\\Python26\\xxx",
                    "remoteRoot": "/usr/bin/python/xxx"} ,
            ], 
            "port": 9091,
            "host": "157.54.167.255"
        }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions