New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote attach - Breakpoint in file that does not exist #318
Comments
From the logs, the mapped path for that breakpoint was |
That is correct. The file exists only on the remote server. Does that mean i should copy it locally ? |
Sorry, I meant - does the file exist at that exact path remotely, and can be accessed? E.g. if you do |
Yes. The file exists on that path and i can read it. No permission issue. |
Can you share |
i can't find that file. Both in the remote server and the local directory under |
i managed to make it work by modifying my "remoteRoot" in launch.json. From "." to the actual path.
|
"." indicates current directory, so the effect of that mapping depends on what that was when you launched debugpy server. I didn't pay close enough attention to your |
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "???"
}
],
"justMyCode": true
}
]
} I am inside a dev container and the debugpy server is running on the host. Is there a way to not hardcode the host path |
Those substitutions are all done by VSCode, so it can only substitute the things that are known on that end. You can use |
Thank you very much. This is my final setup
"containerEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${env:LOCAL_WORKSPACE_FOLDER}"
}
], |
Environment data
Actual behavior
Expected behavior
Breakpoint works.
Steps to reproduce:
This problem is similar to issue #144 that @int19h is trying to fix.
launch.json file
python3 -m debugpy --listen localhost:5678 --log-to /odoo/debug/ /odoo/odoo-server/odoo-bin --config=/etc/odoo-server.conf
Log files from the server:
debugpy.adapter-3689.log
debugpy.server-3679.log
The text was updated successfully, but these errors were encountered: