We do not correctly match filenames for breakpoints when debugging remotely, when the filename is an absolute path (which is the case for any imported module). When both the BP path and the actual path are absolute, we just compare them for equality, which,
of course, does not work in remote case because it is a completely different filesystem (and, in case of Linux and OS X, a completely different path format).
Here's the code in visualstudio_py_debugger.py that is the culprit:
def filename_is_same(win_path, local_path):
if ntpath.isabs(win_path) and path.isabs(local_path):
return path.normcase(win_path) == path.normcase(local_path)
return path.normcase(ntpath.basename(win_path)) == path.normcase(path.basename(local_path))
(created from user report: