DEV Community

The Juanito Learns Show
The Juanito Learns Show

Posted on • Originally published at jptarqu.blogspot.com on

How to debug workflow console projects in Visual Studio 2019 using Designer Breakpoints

I ran into an issue with debugging a Workflow Foundation workflow by using breakpoints in the designer in Visual Studio 2019. The breakpoints in the designer were not being hit when running the console workflow program in debug mode.

A question posted by another member of the community at https://developercommunity.visualstudio.com/content/problem/846593/not-able-to-debug-windows-workflow-designer.html led me to another link at https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.7.2-4.8#windows-workflow-foundation-wf.

In that last page, at the bottom, under the "Workflow XAML checksums for symbols changed from SHA1 to SHA256", I found the piece of configuration code to add to my app.config file in the console workflow VS project. The following is the full configuration of my project that allowed VS to pause at the designer breakpoints:

<?xml version="1.0" encoding="utf-8" ?>

<startup>

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />

</startup>

<runtime>

    <AppContextSwitchOverrides value="Switch.System.Activities.UseSHA1HashForDebuggerSymbols=true" />

</runtime>

Top comments (0)