lmotta / debug_vs_plugin

Plugin to Enable Debug for Visual Studio( tested in Visual Studio Code)
GNU General Public License v2.0
20 stars 8 forks source link

Error with ptvsd #5

Open Gaetanbrl opened 4 years ago

Gaetanbrl commented 4 years ago

Hi, I have followed the advices :

https://gist.github.com/AsgerPetersen/9ea79ae4139f4977c31dd6ede2297f90

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Attacher",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "${workspaceFolder}"
                }
            ]
        }
    ]
}

image

https://github.com/lmotta/debug_vs_plugin/blob/291b9b9468ca387201d93da42309f8f216cbdecb/__init__.py#L80

I could check output text info in VScode but no way to stop process on breakpoint.

Thanks.

lmotta commented 4 years ago

The docstring about 'ptvsd.enable_attach' show that function return a tuple.

Please try use in your .vscode/launch.json: { "configurations": [ { "name": "Python: QGIS Debugger", "type": "python", "request": "attach", "host": "localhost", "port": 5678 }, ] }