I am trying to debug a webapi project in a docker container, but breakpoints are not being hit
I think everything is setup correctly. The reponse comes back correctly from a post. The only issue is that the breakpoints are never hit.
1 Reply
is the container running on the same machine you are debugging from?
I ask because debugging a container is ridiculously complex to get working and debugging a remote container is exponentially worse.
I got debugging to work on a container running in my WSL2 using VS Code and the remote container extensions. Had to use
System.Diagnostics.Debugger.Break();
to get the first breakpoint, then I could use the IDE to add additional breakpoints on the fly.