- run your application with
dotnet watch - Place
waitForDebuggerAttachedorwaitForDebuggerAttachedAndBreakin your main method and save. - App should rebuild printing out pid to attach to
- Use your debugger (in our case VSCode) to attach to this process. See launch.json for example attach config. See Tutorial: Debug a .NET Core console application using Visual Studio Code
- You'll have to attach everytime you save, you can try using .NET Auto Attach plugin to alleviate this minor pain.
Idea originally from Krzysztof Cieslak