question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remote debug attach does not support path mapping

See original GitHub issue

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:

https://github.com/microsoft/PTVS/blob/984cd41766ea27a9b6ac304b437031e7d880899d/Python/Product/PythonTools/PythonTools/Debugger/DebugAdapter/DebugAdapterLauncher.cs#L167

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

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
int19hcommented, Mar 6, 2023

Since launch.vs.json would do more than just fix this issue, I think it would be best to track it separately - #7434

1reaction
int19hcommented, Mar 6, 2023

I doubt we’d be able to reuse the actual code, since C++ project system is very different from ours. But we can reuse their spec (i.e. where to look for the file and how to combine it with project settings), and to some extent probably the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote debugging path mappings don't work. : PY-18491
This is very frustrating. I'm trying to debug a Python app running on a Windows VM remotely. However the path mappings don't seem...
Read more >
Remote Python Debugging Ignores Path Mapping if the ...
I remote debug, and PyCharm, in its vast intelligence, decides to ignore the mappings that I gave it and use the stable release...
Read more >
Debug WebView2 apps with Visual Studio Code
The debugger doesn't perform source path mapping. Can't attach to running process. If you can't attach to a running process, and you get...
Read more >
Firefox does not open when debugging in Visual Studio ...
I have got the following message of VS Code, but it works without additional paths: This file's path isn't mapped to any url...
Read more >
Configure launch.json for C/C++ debugging in ...
Specifies the full path to the executable the debugger will launch or attach to. The debugger requires this location in order to load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found