diff --git a/docs/configuration.md b/docs/configuration.md index f3d0814..e736985 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -634,7 +634,9 @@ Vimspector then orchestrates the various tools to set you up. // %CMD% replaced with the remote-cmdLine configured in the launch // configuration. (mandatory) "runCommand": [ - "python", "-m", "debugpy", "--listen", "0.0.0.0:${port}", + "python", "-m", "debugpy", + "--listen", "0.0.0.0:${port}", + "--wait-for-client", "%CMD%" ] @@ -848,7 +850,9 @@ port. // %CMD% replaced with the remote-cmdLine configured in the launch // configuration. (mandatory) "runCommand": [ - "python", "-m", "debugpy", "--listen", "0.0.0.0:${port}", + "python", "-m", "debugpy", + "--listen", "0.0.0.0:${port}", + "--wait-for-client", "%CMD%" ] diff --git a/support/test/python/simple_python/.vimspector.json b/support/test/python/simple_python/.vimspector.json index 29d7d43..69d37a6 100644 --- a/support/test/python/simple_python/.vimspector.json +++ b/support/test/python/simple_python/.vimspector.json @@ -24,6 +24,24 @@ }, "delay": "5000m" } + }, + "python-remote-ssh": { + "variables": { + "port": "8765" + }, + "port": "${port}", + "host": "${host}", + "launch": { + "remote": { + "host": "${host}", + "account": "${account}", + "runCommand": [ + "python3", "-m", "debugpy", "--listen", "0.0.0.0:${port}", + "--wait-for-client", + "%CMD%" + ] + } + } } }, "configurations": { @@ -164,6 +182,23 @@ "stopOnEntry": false, "console": "integratedTerminal" } + }, + "run - remote host": { + "adapter": "python-remote-ssh", + "remote-cmdLine": [ + "${remoteRoot}/main.py" + ], + "remote-request": "launch", + "configuration": { + "request": "attach", + "redirectOutput": true, + "pathMappings": [ + { + "localRoot": "${workspaceRoot}", + "remoteRoot": "${remoteRoot}" + } + ] + } } } }