Skip to content

Remote debug attach does not support path mapping #6610

@rchiodo

Description

@rchiodo

Following the directions here:
https://docs.microsoft.com/en-us/visualstudio/python/debugging-python-code-on-remote-linux-machines?view=vs-2019

I cannot get breakpoints to bind.

Internally debugpy is returning this:

1> [DebugAdapter] <-- R (setBreakpoints-12) [20 ms]: {"type":"response","request_seq":12,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"verified":false,"message":"Breakpoint in file that does not exist.","source":{"path":"c:\\Users\\aku91\\source\\repos\\PythonApplication3\\PythonApplication3\\test.py","sources":[],"checksums":[]},"line":7}]},"seq":15}

This really means we need path mapping for the remote machine. There was some discussion in the past of VSCodeDebugAdapterHost supporting a launch.json that could provide that mapping. Short of that, we'd have to provide that here:

private static DebugAttachInfo GetTcpAttachDebugInfo(IAdapterLaunchInfo adapterLaunchInfo) {

We need to pass the attach request the path mappings like VS code does:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions