High level docs - .net debug, docker file override, nuget restore tokens #3474
Replies: 3 comments 2 replies
-
Yes--but the way is using the For .NET apps, the As for how to configure NuGet, for debugging it should be volume mapping in your NuGet folder; for true release builds it will need the NuGet config with the PAT copied in just after the All of this is the same as how Visual Studio does .NET debugging in Docker. However, VS additionally supports debugging in Release mode, which does the full Docker build within the container. @ucheNkadiCode do we have any docs or wikis for either VSCode or VS that describe this process in greater detail? |
Beta Was this translation helpful? Give feedback.
-
Hey @bigredmachine, do either of these two links help you?
Other than that, @ghogen are there any other docs I may be missing dealing with the topics below
|
Beta Was this translation helpful? Give feedback.
-
@bigredmachine @bwateratmsft @ucheNkadiCode Would that have answered your question, or do you think something should be added there? |
Beta Was this translation helpful? Give feedback.
-
Hi,
been trying to wrap my head around how this extension works for building and debugging a .net core project.
Initially was trying to work out where the build was occurring, as I pass in a PAT token to the dockerfile, but noticed that it wasn't getting to the step where it restored the packages.
And getting warning
"[Warning] One or more build-args [****] were not consumed"
I can now see this is done outside of the container.
I've got some clues from these other discussions
#3273
#2729
with the volume mounts being set.
And looking at the code/behaviour when "enableDebugging" is set.
I'm wondering when "enableDebugging" is enabled, what's the logic used to run the initial part of the dockerfile, before then restoring to mounting the location of the application built in debug mode off disk?
Does it run to a specific stage/--target?
Before overriding the logic to use the files of the volume mounts?
I can see when "enableDebugging" isn't set, then runs all the way through the docker file.
I was then looking how to spin up the container in release mode, having built the image and restored the packages. inside the docker file.
If I try to do CTRL+F5/Run without debugging, get error
"starting container process caused: exec: "/remote_debugger/vsdbg": stat /remote_debugger/vsdbg: no such file or directory: unknown"
{ "name": "Docker .NET Core Launch", "type": "docker", "request": "launch", "preLaunchTask": "docker-run: release", "netCore": { "appProject": "${workspaceFolder}/test.csproj" } }
I can change the launch to start chrome instead, but it doesn't terminate the container on stop.
{ "name": "Launch Chrome", "request": "launch", "type": "pwa-chrome", "url": "https://localhost:8080/", "webRoot": "${workspaceFolder}", "preLaunchTask": "docker-run: release" },
Or I can just trigger the build "docker-run: release", and launch the container manually, and launch a browser from the container.
Is it supported to launch a container without debugging, built in release mode (without the debugger volume), with this extension?
In Summary, looking for some high level docs.
-Where the build occurs, where the nuget packages are restored. (what's occurring inside docker, what's occurring outside)
-how the dockerfile is overridden when "enableDebugging" is set, docs around the volume mappings for the debugger to work.
-how to launch a release build without debugging (if this extension supports this)
I think this would have helped me understand where I needed to configure the nuget package sources for the debug releases. And help demystify how the debug configuration is overriding the docker file.
Beta Was this translation helpful? Give feedback.
All reactions