Question regarding Python pathMappings #3246
-
Hi, I'm having trouble using the pathMappings attribute in Python's launch.json. A quick scroll at the codebase also suggests that the field is only used for debugging and nothing else. Is its intended purpose to mount workspace code like a volume, or am I misunderstanding its purpose? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Converting to discussion. The |
Beta Was this translation helpful? Give feedback.
-
Yep, figured this out after a bit of trial and error. I think it would help others if this was stated in the docs instead. |
Beta Was this translation helpful? Give feedback.
Converting to discussion.
The
pathMappings
attribute is basically to help the debugger map files in the remote process / remote workspace to files in the local directory--this is necessary to make breakpoints work. In the case of Docker debugging, it's a mapping from the files in the container (which are under the/app
path) to the local workspace.