-
When working with .NET projects not running under .NET Aspire, it is easy to debug .NET code running inside a Docker container using Visual Studio's fast build feature as described here: https://learn.microsoft.com/en-us/visualstudio/containers/edit-and-refresh I am working on a new distributed application running under .NET Aspire and would like:
The reason I need to use Docker containers for my .NET development are:
However, it is not clear to me from the documentation whether this is intended to be possible and, if so, how. The documentation is currently ambiguous and it would be great if it could be updated if this is indeed possible. If this is not possible, is the intention that anyone wishing to run .NET projects inside Docker containers use Docker Compose and the standalone Aspire dashboard instead? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
Aspire doesn't run projects in a container today. When we do add this feature, we'll integrate with the IDE for debugging. |
Beta Was this translation helpful? Give feedback.
-
Would love to have that feature, we have some projects that have to run in Linux, would love to be able to debug while using Aspire. |
Beta Was this translation helpful? Give feedback.
-
What's the answer for this? I've been playing with it and I can run the project in docker using AddDockerfile, but I cannot figure out how to get the debugger attached. I've set the stage to base. Added bind mounts for Added labels for Set tty to true Added environment variables for Best I can tell this should be everything, but when I set a breakpoint in the project and I have AppHost selected as the startup project I get an alert on my breakpoint that a copy of the file was found in AppHost.dll but it is different so the breakpoint won't be hit. Any tips on where to go with this would be greatly appreciated, I'm aware this is not a supported scenario at this time, but I have some unique requirements where having this work would be extremely helpful. |
Beta Was this translation helpful? Give feedback.
Aspire doesn't run projects in a container today. When we do add this feature, we'll integrate with the IDE for debugging.