0

I found an article about develop on remote docker host for visual studio code, But I need something like this for Visual Studio 2022 Enterprise Edition

How to develop on remote docker host in Visual Studio 2022? (Build, Debug, Test)


Some info I hope to be useful

As you can see in 2. Using DOCKER_HOST environment variable to set up the target engine in manual way we can use DOCKER_HOST to run docker in remote host, But I do not know how to set this variable in Visual Studio dcproj for Remote Development and remote Debugging and Remote Testing?

sorosh_sabz
  • 2,356
  • 2
  • 32
  • 53
  • I found question for debugging step of my question, but this question does not have answer :( https://stackoverflow.com/q/54838418/1539100 – sorosh_sabz Jul 30 '23 at 18:59

1 Answers1

1

The container tools in VS do not support launching containers except through Docker Desktop locally.

The closest work-around for this is to launch the container(s) through the Docker CLI and then attach the VS debugger using the remote container debugging support: https://learn.microsoft.com/en-us/visualstudio/debugger/attach-to-process-running-in-docker-container

  • Are you sure any trick or advanced workaround does not exist to meet this requirements? attach to process is very in effective in inner looping development – sorosh_sabz Aug 04 '23 at 15:35
  • There isn't a work-around. You can upvote the suggestion for this: https://developercommunity.visualstudio.com/t/Allow-Visual-Studio-container-tools-use-/10179694 – Nathan Carlson - MSFT Aug 07 '23 at 23:33