Open mcitoler opened 1 year ago
I suppose it works when the file layout is the same as on the remote? But even if the relative file layout is the same, you might be in a different root directory, and that would break it, right?
I suppose it works when the file layout is the same as on the remote?
That's correct. In my setting, I was able to make it work because I could run a devcontainer using the same image that is running in the remote server and I could replicate the source code mounts.
But even if the relative file layout is the same, you might be in a different root directory, and that would break it, right?
As far as I understand that is correct as well. Unless the absolute path in both local and remote is the same, it currently doesn't work.
One of my favorite features of the
vscode-jupyter
extension is the ability to debug notebook cells and put breakpoints on my own python modules. However, I find myself in a situation where this is not possible. If you are running your notebooks in a remote server, this no longer works because stepping through the code will use the remote filepaths and, unless your local directory layout is exactly the same as your remote layout, you won't be able to step through your code because VSCode tries to open the file with the remote filepath:Depending on your remote setup, you might get around this by setting up a devcontainer with the same image as your remote server but oftentimes you don't have the flexibility to do so.
Fortunately, we already have the
pathMappings
feature that can be used to configure yourlaunch.json
to debug scripts remotely, see docs. It would be very useful to include a hook through thesettings.json
so we can add apathMappings
property to debug in remote Jupyter servers. i.e. something like: