dapr / dotnet-sdk

Dapr SDK for .NET
Apache License 2.0
1.11k stars 331 forks source link

How to debug with vs2022 #793

Open wjkhappy14 opened 2 years ago

wjkhappy14 commented 2 years ago

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

then how to debug the app with vs2022 or vscode ?

modabas commented 2 years ago

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

richbeales commented 2 years ago

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

halspang commented 2 years ago

@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?

DaleyKD commented 2 years ago

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.

richbeales commented 2 years ago

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)

m3nax commented 5 months ago

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.