dotnet-sdk icon indicating copy to clipboard operation
dotnet-sdk copied to clipboard

How to debug with vs2022

Open wjkhappy14 opened this issue 3 years ago • 6 comments

when run the:dapr run --app-id routing --app-port 5000 -- dotnet run successfully

then how to debug the app with vs2022 or vscode ?

wjkhappy14 avatar Nov 29 '21 10:11 wjkhappy14

https://github.com/dapr/dotnet-sdk/issues/401#issuecomment-747563695 worked with vs 2019 for me. I used second method (VS Extension)

modabas avatar Dec 01 '21 12:12 modabas

MSFT is there any plans to integrate this more 'obviously' into VS 2022? Rather than 3rd party extensions.

richbeales avatar Aug 04 '22 14:08 richbeales

@wjkhappy14 - You can also start dapr separately from your app as it will wait for your app port to start listening to finish starting. You can then debug your app normally.

@richbeales - Not that I'm aware of, but we can take it into consideration. What kind of features/abilities would you want from a Dapr extension in VS?

halspang avatar Aug 29 '22 23:08 halspang

I'm with @richbeales here. I'm just starting to investigate how I can use Dapr with my current microservices, which is quite a few different .sln's in Visual Studio 2022. All the steps around Dapr, having to use manual CLI all the time, etc., sure makes me not interested in using it.

I realize, as developers, we're going backwards (used to be DOS/CLI, then we had nice GUI, but now we're back to CLI). I'm trying desperately to keep the inner loop VERY simple for my teams.

Until I spend time investigating Dapr, I have zero input in how to make this easier.

DaleyKD avatar Aug 30 '22 13:08 DaleyKD

Yes @DaleyKD we've become accustomed to Visual Studio giving us "Right click to add feature x" (Dapr in this case), then "F5 to run" the project.

VS's key advantage over the terminal/VSCode is it should be able to bootstrap this stuff for you (and keep that tight debugging loop)

richbeales avatar Aug 30 '22 14:08 richbeales

Any updates? I have spoken to some programmers who have used dapr to develop software in production, and the problem they have all reported is the difficulty of debugging with Visual Studio.

m3nax avatar Apr 12 '24 15:04 m3nax