'Visual Studio 2015 does not hit breakpoint when debugging WF workflow
Visual Studio 2015 does not hit the breakpoint that I set when debugging WF workflow. Are there any settings that I have missed?
Steps to reproduce:
- Create new workflow console application
- Create workflow, e.g. just a WriteLine activity
- Set breakpoint on activity in workflow designer
- Hit F5 to run in debug
This works fine in VS 2012 and 2013, so I am thinking that either I am missing a setting or there is a bug...
Solution 1:[1]
Solved by disabling "Just my code" in debug settings. In my opinion the workflow is "my code" though...
Solution 2:[2]
I have bumped across this issue multiple times where Workflow does not hit the breakpoints in the designer. This is not something specific to VS 2105, since I have encountered this with VS 2013 also.
As a resolution, You will need to move any random control in your workflow, save, build the solution and then give it a try. The root cause of the problem is that there are scenarios when the debug symbol line in the XAML does not update, and hence Workflow is not able to identify recent changes.
If you are able to recreate this issue again, check the debug symbol line in the XAML file & you will find that it did not update. Once you just move any control on the workflow, the debug symbol should be getting updated and your breakpoint will be hit in the designer.
Let me know if this does not resolve this problem.
Solution 3:[3]
When "Just my code" is disabled (unchecked) then step into (when debugging code) does not work.
In documentation you can find a warning box with text:
Ensure that you select the option Enable Just My Code (Managed Only) from the Tools, Options, Debugging menu before you debug. If you have two sequences nested within another sequence and you set a break point on the first inner sequence, pressing F11 will not debug into the second inner sequence if the Enable Just My Code (Managed Only)option is not selected.
https://msdn.microsoft.com/en-us/library/dd489405.aspx?f=255&MSPPError=-2147217396
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | carens |
Solution 2 | Sammy |
Solution 3 | Martin Rulf |