Search code examples
sshvisual-studio-coderemote-debuggingdocker-container

How to remote-debug into docker container in a cloud instance using Visual Code


I have some docker containers in a cloud instance (Google Compute Engine). I do want to use Visual Code to remote debug into the code which is already deployed into a docker container within a cloud instance.

Though there is already Visual Code Remote Extensions which allow to remote-debug codes in either local docker container or remote cloud instance.

The problem now is that the docker container instance is within a remote cloud instance.

Thanks.


Solution

  • You will need to first add the VM as a remote Docker host to your local dev machine. Once it's done you can use the VS code remote development tools as usual.