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
|
||||
// configuration. (mandatory)
|
||||
"launchCommmand": [
|
||||
"python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
||||
"python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||
"%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
|
||||
// pidCommand above (mandatory)
|
||||
"attachCommand": [
|
||||
"python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
||||
"python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||
"--pid", "%PID%"
|
||||
]
|
||||
|
||||
|
|
@ -624,7 +624,7 @@ port.
|
|||
// %CMD% replaced with the remote-cmdLine configured in the launch
|
||||
// configuration. (mandatory)
|
||||
"launchCommmand": [
|
||||
"python", "-m", "debugpy", "--listen 0.0.0.0:${port}",
|
||||
"python", "-m", "debugpy", "--listen", "0.0.0.0:${port}",
|
||||
"%CMD%"
|
||||
]
|
||||
|
||||
|
|
@ -648,13 +648,13 @@ port.
|
|||
// call a custom command to returm the PID for a named service, so
|
||||
// here's an examle:
|
||||
//
|
||||
"sh", "-c", "pgrep", "-f ${filename}"
|
||||
"sh", "-c", "pgrep", "-f", "${filename}"
|
||||
],
|
||||
|
||||
// Command to attach the debugger; %PID% replaced with output of
|
||||
// pidCommand above (mandatory)
|
||||
"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%"
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -695,23 +695,14 @@ class DebugSession( object ):
|
|||
return ssh
|
||||
|
||||
def _GetDockerCommand( self, remote ):
|
||||
if 'container' not in remote:
|
||||
raise ValueError( 'Invalid container; must be string' )
|
||||
|
||||
docker = [ 'docker exec' ]
|
||||
docker = [ 'docker', 'exec' ]
|
||||
docker.append( remote[ 'container' ] )
|
||||
return docker
|
||||
|
||||
def _GetRemoteExecCommand( self, remote ):
|
||||
is_ssh_cmd = any(
|
||||
remote.get( 'ssh' ),
|
||||
remote.get( 'account' ),
|
||||
remote.get( 'host' ),
|
||||
)
|
||||
is_docker_cmd = any(
|
||||
remote.get( 'docker' ),
|
||||
remote.get( 'container' ),
|
||||
)
|
||||
is_ssh_cmd = any( key in remote for key in [ 'ssh','host', 'account' ] )
|
||||
is_docker_cmd = 'container' in remote
|
||||
|
||||
if is_ssh_cmd:
|
||||
return self._GetSSHCommand( remote )
|
||||
elif is_docker_cmd:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue