-
Notifications
You must be signed in to change notification settings - Fork 68
pydev debugger: warning: trying to add breakpoint to file that does not exist #965
Comments
Can you give the launch configuration you are using for this? |
I use the default configuration : {
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Python: Attach",
"type": "python",
"request": "attach",
"port": 5678,
"host": "localhost"
},
{
"name": "Python: Module",
"type": "python",
"request": "launch",
"module": "enter-your-module-name-here",
"console": "integratedTerminal"
},
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"console": "integratedTerminal",
"args": [
"runserver",
"--noreload",
"--nothreading"
],
"django": true
},
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py"
},
"args": [
"run",
"--no-debugger",
"--no-reload"
],
"jinja": true
},
{
"name": "Python: Current File (External Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
}
]
} When I select Python: Current File (Integrated Terminal) and I start the debug, it works but I have the following message :
If I use the following Python code : import ptvsd
ptvsd.enable_attach()
ptvsd.wait_for_attach()
... I start my python program and my program pause and listen to port 5678 :
When I click on Python: Attach, my program finish with the following message :
If I replace the line 231 like explain above, it works. |
@karthiknadig this is actually a feature request (support cygwin in the debugger) -- the first fix needed is dealing with cygpaths as @gigi206 pointed, but there may be more to it (as a note, when/if cygwin support is added, we should also make sure there's a worker to test it in the ci). |
I see. It might be worth a shot to try 'Attach' with
|
I have modified my launch.json file to : "pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/c/Users/gigi/Desktop/python/"
}
] It seems to work with attach request type but pathMappings seems not be allowed with launch request type. I have the message pydev debugger: warning: trying to add breakpoint to file that does not exist: /:\Users\gigi\Desktop\python\gigix.py (will have no effect) with launch request type but it works. |
@DonJayamanne Does 'launch' support |
Issue moved to Microsoft/vscode-python #3567 via ZenHub |
The proposal of gigi206 does not work with me. , I receive the message "subprocess not defined". |
@Brazzelhuber The issue you are seeing might be a different issue. Please file a separate bug with details. |
@karthiknadig: The problem was that I had to import subprocess. But when I did this, I received a message that my Python is not well compiled and a long list of Files, the address of which could not be found. |
Environment data
Issue
I use VSCode with extension ms-python.python-2018.9.1 and I use python under msys2 (cygwin like) :
When I try to debug a python file I have the following message :
From pydevd_file_utils.py file, if I replace L231 by the following line, it works :
https://github.com/Microsoft/ptvsd/blob/66d75d8c87c848d0f7b60102ac6a2a134c34eae4/ptvsd/_vendored/pydevd/pydevd_file_utils.py#L231
I opened this issue (fabioz/PyDev.Debugger#125) but it seems that it should open here...
Is it possible to add a test to determine the path under cygwin / msys2 ?
The text was updated successfully, but these errors were encountered: