SlicerDebuggingTools icon indicating copy to clipboard operation
SlicerDebuggingTools copied to clipboard

Add note to documentation wrt VS Code `launch.json` template

Open HarryDC opened this issue 2 years ago • 1 comments

Currently the template for launch.json comes up with something similar to

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "."
                }
            ],
            "justMyCode": true
        }
    ]
}

But with a development setup (i.e. slicer built from source) the pathMappings parameter here might the debugger from stepping into slicer python code, this might also be a problem how i set up the workspace though, but removing the pathMappings entry allowed stepping into the base slicer python

HarryDC avatar Nov 29 '23 13:11 HarryDC

Yes, path mappings must be removed. We have already described this in the setup instructions, but it is practically impossible to make people read the documentation carefully.

Any suggestions for improving the documentation is welcome but probably we would need to somewhow change this setting automatically or find a way to make things work with the default path mapping.

lassoan avatar Nov 29 '23 13:11 lassoan