Skip to content

Commit af13695

Browse files
authored
Merge pull request #819 from jordanpwalsh/docker-workdir-support
Docker workdir support
2 parents 0b04cd0 + 3c89346 commit af13695

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/schema/vimspector.schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
"type": "string",
114114
"description": "Name or container id of the docker run container to connect to (via docker exec). Note the container must already be running (Vimspector will not start it) and it must have the port forwarded to the host if subsequently connecting via a port (for example <tt>docker run -p 8765:8765 -it simple_python</tt>)."
115115
},
116+
"docker_args": {
117+
"type": "array",
118+
"items": {"type": "string"},
119+
"description": "Extra command line args to pass to docker exec."
120+
},
116121
"ssh": {
117122
"type": "object",
118123
"description": "Optional to customize the ssh client and its arguments to execute for remote-launch or remote-attach.",

python3/vimspector/debug_session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,8 @@ def _GetShellCommand( self ):
16831683

16841684
def _GetDockerCommand( self, remote ):
16851685
docker = [ 'docker', 'exec', '-t' ]
1686+
if 'docker_args' in remote:
1687+
docker += remote[ 'docker_args' ]
16861688
docker.append( remote[ 'container' ] )
16871689
return docker
16881690

0 commit comments

Comments
 (0)