I've used "type": "python" to debug remote python servers. Now I'm seeing this warning in launch.json:
This configuration will be deprecated soon. Please replace
pythonwithdebugpyto use the new Python Debugger extension.
My original setting:
{
"type": "python",
"request": "attach",
"name": "attach remote",
"host": "192.168.1.101",
"port": 8765,
"pathMappings": [
{
"localRoot": "${workspaceFolder}/...",
"remoteRoot": "/usr/app/..."
}
],
"justMyCode": false
},
When I switch to "type": "debugpy" I get the following error on the "port" and "host" fields:
Property port is not allowed.
So the question is: how to add the port and host information to complete the migration of the debug configuration?


So it turns out it's pretty easy: replace the
"port"and"host"attributes with"connect", so if your configuration was:It becomes: