0

This seems to be a WPF-specific issue.

If I set a breakpoint in the code, the program will pause when it reaches that line, and I can edit/add/remove code, and then continue - it runs the newly edited code (ie, it behaves as expected).

However, if I hit 'Break All', I get moved to window that says "Your App has entered a Break State...". If I try to edit my code, nothing happens. I try to type but nothing happens - no text appears, and there's no errors that pop up or anything.

I don't have this problem in WinForms applications - just WPF. If I create a basic WPF project from the template, I still have the issue.

It's a very frustrating issue! My ugly hacked solution is to add a button to my program's UI called 'Break', which executes a single line of code that has a breakpoint on it, basically recreating the behaviour that 'Break All' should have.

Weirdly, it's not an issue if I'm on a WPF project which uses multiple threads. Hitting 'Break All' in this case acts as if there's a breakpoint on the line of code where the background thread is set up.

amputek
  • 59
  • 1
  • 6

1 Answers1

0

I am not sure..but you can give a try. To enable/disable Edit and Continue. In the Options dialog box, expand the Debugging node, and select Edit and Continue. In the Options dialog box Edit and Continue page, select or clear the Enable Edit and Continue check box. The setting takes effect when you restart the debugging session

source:https://msdn.microsoft.com/en-us/library/ms164926.aspx

Param
  • 1
  • 1
  • I have 'Enable Edit and Continue' checked. Disabling it actually lets me edit code after hitting 'Break All', although none of the changes are applied until I re-compile. – amputek Apr 10 '18 at 15:59