From a6ff97fbf7ef63f7f52e803c3a667daa5930cd5d Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 13 Apr 2018 15:11:03 -0700 Subject: [PATCH] Check if local and remote roots are same (#345) --- ptvsd/wrapper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ptvsd/wrapper.py b/ptvsd/wrapper.py index 51f115b9..d22f66da 100644 --- a/ptvsd/wrapper.py +++ b/ptvsd/wrapper.py @@ -1078,7 +1078,10 @@ class VSCodeMessageProcessor(ipcjson.SocketIO, ipcjson.IpcChannel): try: return self.source_map.to_vscode(filename, autogen=False) except KeyError: - pass + # If attaching to a local process (then remote and local are same) + for local_prefix, remote_prefix in pydevd_file_utils.PATHS_FROM_ECLIPSE_TO_PYTHON: # noqa + if local_prefix == remote_prefix and filename.startswith(local_prefix): # noqa + return 0 server_filename = pydevd_file_utils.norm_file_to_server(filename)