I get the following exception (in Dutch, English translation follows in the text) which breaks my debugger when I press 'OK' it stops the debug session and closes the application:
Translated in text:
--------------------------- LerTemperaturaWPF.vshost.exe - Application Error --------------------------- INTERNAL ERROR: Unhandled exception in Debugger::HandleIPCEvent. Event ID=0x246. Exception code=0xc0000005, Eip=0x68fbaeca. Process ID=0x1094 (4244), Thread ID=0x10a4 (4260). --------------------------- OK ---------------------------
This happens if the first time the debugger breaks are inside a certain piece of code:
private void PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { // Set value of property, only when the long editor is selected (no optionlist item is selected) if (this.Editor.SelectedItem != null) { if (this.Editor.SelectedItem as OptionForList == null) { this.Editor.SelectedValue = ((Management.Property)this.Editor.SelectedItem).Value; this.Editor.SelectedIndex = 0; } } }
It happens when I place the breakpoint inside the 2nd if statement, before the second if statement (where ever I place it). It gives me no problems.
If I make sure the first break the debugger has is before this code and afterward it hits a breakpoint in this code there are no problems either. The debugger must have broken before getting to this code. Now I do not think it has anything to do with this code (90% certain).
The property changed is a user control and somehow I think the debugger can't handle the user control properly? maybe?
Has anyone seen this behavior before and know how to fix this? do I need to turn off (or on) some of the debug settings??
To change this setting for a particular exception, select the exception, right-click to show the shortcut menu, and select Continue When Unhandled in User Code. You may also change the setting for an entire category of exceptions, such as the entire Common Language Runtime exceptions).
To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .
Remove breakpoints For non-exception breakpoints: click the breakpoint in the gutter. For all breakpoints: from the main menu, select Run | View Breakpoints Ctrl+Shift+F8 , select the breakpoint, and click Remove Delete .
Right click on the project/solution -> Properties -> Debug -> Check "Enable native code debugging".
(1) On the Debug menu->Windows->Exceptions, and enable all Thrown check boxes. Debug the application, it will show you the actual and detailed errors in a message Box.
(2) Right click on the project/solution -> Properties -> Debug -> Uncheck "Enable visual studio hosting process".
(3) Please also change the Platform target (X86/Any CPU/X64), re-compile the app, debug it again.
(4)Tools > Options > Debugging > General > "Use Managed Compatibility Mode" checkbox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With