comments
This commit is contained in:
parent
cd1b304d30
commit
3d113eaec4
2 changed files with 9 additions and 18 deletions
|
|
@ -419,7 +419,7 @@ Vimspector then orchestrates the various tools to set you up.
|
||||||
// %CMD% replaced with the remote-cmdLine configured in the launch
|
// %CMD% replaced with the remote-cmdLine configured in the launch
|
||||||
// configuration. (mandatory)
|
// configuration. (mandatory)
|
||||||
"launchCommmand": [
|
"launchCommmand": [
|
||||||
"python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
"python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||||
"%CMD%"
|
"%CMD%"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -449,7 +449,7 @@ Vimspector then orchestrates the various tools to set you up.
|
||||||
// Command to attach the debugger; %PID% replaced with output of
|
// Command to attach the debugger; %PID% replaced with output of
|
||||||
// pidCommand above (mandatory)
|
// pidCommand above (mandatory)
|
||||||
"attachCommand": [
|
"attachCommand": [
|
||||||
"python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
"python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||||
"--pid", "%PID%"
|
"--pid", "%PID%"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -624,7 +624,7 @@ port.
|
||||||
// %CMD% replaced with the remote-cmdLine configured in the launch
|
// %CMD% replaced with the remote-cmdLine configured in the launch
|
||||||
// configuration. (mandatory)
|
// configuration. (mandatory)
|
||||||
"launchCommmand": [
|
"launchCommmand": [
|
||||||
"python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
"python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||||
"%CMD%"
|
"%CMD%"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -648,13 +648,13 @@ port.
|
||||||
// call a custom command to returm the PID for a named service, so
|
// call a custom command to returm the PID for a named service, so
|
||||||
// here's an examle:
|
// here's an examle:
|
||||||
//
|
//
|
||||||
"sh", "-c", "pgrep", "-f ${filename}"
|
"sh", "-c", "pgrep", "-f", "${filename}"
|
||||||
],
|
],
|
||||||
|
|
||||||
// Command to attach the debugger; %PID% replaced with output of
|
// Command to attach the debugger; %PID% replaced with output of
|
||||||
// pidCommand above (mandatory)
|
// pidCommand above (mandatory)
|
||||||
"attachCommand": [
|
"attachCommand": [
|
||||||
"sh", "-c", "python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
"sh", "-c", "python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||||
"--pid", "%PID%"
|
"--pid", "%PID%"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -695,23 +695,14 @@ class DebugSession( object ):
|
||||||
return ssh
|
return ssh
|
||||||
|
|
||||||
def _GetDockerCommand( self, remote ):
|
def _GetDockerCommand( self, remote ):
|
||||||
if 'container' not in remote:
|
docker = [ 'docker', 'exec' ]
|
||||||
raise ValueError( 'Invalid container; must be string' )
|
|
||||||
|
|
||||||
docker = [ 'docker exec' ]
|
|
||||||
docker.append( remote[ 'container' ] )
|
docker.append( remote[ 'container' ] )
|
||||||
return docker
|
return docker
|
||||||
|
|
||||||
def _GetRemoteExecCommand( self, remote ):
|
def _GetRemoteExecCommand( self, remote ):
|
||||||
is_ssh_cmd = any(
|
is_ssh_cmd = any( key in remote for key in [ 'ssh','host', 'account' ] )
|
||||||
remote.get( 'ssh' ),
|
is_docker_cmd = 'container' in remote
|
||||||
remote.get( 'account' ),
|
|
||||||
remote.get( 'host' ),
|
|
||||||
)
|
|
||||||
is_docker_cmd = any(
|
|
||||||
remote.get( 'docker' ),
|
|
||||||
remote.get( 'container' ),
|
|
||||||
)
|
|
||||||
if is_ssh_cmd:
|
if is_ssh_cmd:
|
||||||
return self._GetSSHCommand( remote )
|
return self._GetSSHCommand( remote )
|
||||||
elif is_docker_cmd:
|
elif is_docker_cmd:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue