dapr / dapr/dotnet-sdk

Cannot debug anymore Dapr Actors in Visual Studio 2022 targeting framework net6.0

Open
#811 8 comments 0 reactions 0 assignees View on GitHub
kind/bug
Dominant language
C#
Stars
1.2k
Forks
378
Avg merge
1d 22h
Merged PRs (30d)
5

Description

What version of Dapr?
Dapr Actors 1.5.0

Expected Behavior
To be able to debug step by step when attaching the code to a process.

Actual Behavior
Since we are targeting the net6.0 framework, it is no more possible to debug the code in Visual Studio 2022.
Some error messages appears in the output console
'DaprActorService.exe' (CoreCLR: clrhost): Failed to load metadata for 'DaprActorContract.ICustomActor_.actorV1.disp', possibly because the process is corrupt.
'DaprActorService.exe' (CoreCLR: clrhost): Failed to load metadata for 'DaprActorContract.ICustomActor_.actorV1.mt', possibly because the process is corrupt.
We get this when a breakpoint is hitting.

![ApplicationInBreakMode](https://user-images.githubusercontent.com/68385917/148527390-fe5b95aa-e3da-425d-9ae8-8bd8c73e751e.png)

When clicking "Continue execution" the Actor doesn't crash, it is just not possible to debug step by step.
It is working when targeting the net5.0 framework.

Steps to Reproduce the Problem
In self-hosted mode,

launch Actor with the following command :
pwsh.exe -Command "cd ..\src\DaprActorService; dapr run --app-id actor1 --app-port 5001 --dapr-http-port 55001 dotnet run"
attach to process in visualstudio 2022
add a breakpoint
invoke the actor through the actor proxy

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.