Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker workdir support #819

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions docs/schema/vimspector.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
"type": "string",
"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>)."
},
"docker_args": {
"type": "array",
"items": {"type": "string"},
"description": "Extra command line args to pass to docker exec."
},
"ssh": {
"type": "object",
"description": "Optional to customize the ssh client and its arguments to execute for remote-launch or remote-attach.",
Expand Down
2 changes: 2 additions & 0 deletions python3/vimspector/debug_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,8 @@ def _GetShellCommand( self ):

def _GetDockerCommand( self, remote ):
docker = [ 'docker', 'exec', '-t' ]
if 'docker_args' in remote:
docker += remote[ 'docker_args' ]
docker.append( remote[ 'container' ] )
return docker

Expand Down