Using launch.json configuration to show a connection failure, is there something wrong with my configuration? What are the functions of pathMapping and runtimeArgs in your JSON file?Should I set my own working path address behind the WorksapceFolder?
“remoteRoot”: “${workspaceFolder}”,
“localRoot”: “${workspaceRoot}”,
I don’t know what to put in the path here? Like the kit.exe path to create

Hi. Those paths should be correct for most cases. They’re used to inform debugpy. Does your VSCode $workspaceFolder have an “app” symlink? This should be created automatically or by running the link_app.bat in the project. Also, have you selected the Kit python interpreter in VSCode?
${workspaceFolder}/app/kit/python/python.exe
I think only host and port really important, for it just works. Maybe port is not available? What the error says?
According to your configuration, I cannot import PXR and access its source code
Sorry if my reply confused you. You shouldn’t need to edit the launch.json unless to try a different port number like @anovoselov suggested. Here’s what my launch.json looks like:
Let us know if you’re getting any error messages when you try to start the debugger that might help us narrow down the cause.
1 Like
VS Code may generate a wrong version of the launch.json which looks like (in my case):
{
// 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": 3000
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
],
"justMyCode": true
}
]
}
This json has smth wrong in it, as it is possible to connect to the CREATE from VS Code, but debugger catches no breakpoints. I use VS Code 1.79.1. Probably VS Code, or some plugin that knows about python debugging, prepares json in a wrong way.
A json that mati-nvidia has posted is the one that brought back my debugger to the proper work.