Debug Application under VSCode and Docker–part 22
What I wanted is that people that have only a container application ( docker) and VSCode ( not Visual Studio , nor .NET Core Framework) be able to debug the application and run it. That means, I no longer require to install .NET Core SDK on the local PC
Read a lot
Some important things :
- in the devcontainer.json put “shutdownAction”: “stopContainer”
Delete continuously the vscode image if something wrong
docker container prune -f
docker images “vs*”
docker image rm <id of the prev image>
Now I have all in place ( see commit https://github.com/ignatandrei/InfoValutar/commit/474698d33e20e1aa6fc9e2fd6f4c42ea73e50b03 )
A .devContainer folder with a DockerFile and devcontainer.json ( to construct the docker container)
A .vscode folder with launch.json , devcontainer.json, settings.json – to run F5 into the container
All I need is to Launch VSCode, press Remote-Container : Open Folder in Container, goto Infovalutar folder that has the .sln. Then press F5 in VS Code and voila!
Now, anywhere I go, I can launch VSCode and debug the application.And one hour passes...
(This is the result of 1 hour per day auto-challenge as a full cycle developer for an exchange rates application)
( You can see the sources at https://github.com/ignatandrei/InfoValutar/ )