views:

147

answers:

2

A WPF application. Debugging. Stop on break point. After few seconds Visual Studio (2008) spontaneously aborts the application execution. It is never mind what I do after stop on break point: even if I do nothing.

With very simple test WPF application everything is OK with debugging.

Any ideas?

+2  A: 

When an application aborts that quickly without warning it's usually the result of a stack overflow in the process. This makes it difficult (if even possible) to do tear downs operations like bringing up Dr Watson.

One thing I didn't quite understand is if the application or VS is suddenly stopping.

If it's the application there is likely a StackOverflow occurring in such a way that VS can't trap the exception. Try disabling Just My Code debugging, turn off implicit function evaluation and break on first chance exceptions. That should hopefully help reveal the problem.

JaredPar
A thing to be wary of when you see this symptom is 'tools/options/debugging/general/automatically call string conversion functions' (or whatever that option is called). For a while I had a project whose runtime was fine but had types whose ToString() or DebuggerDisplayAttributes would StackOverflow, which meant that things were fine until you hit a breakpoint that had locals on the stack that forced the debugger to call ToString() and made things blow up.
Brian
+1  A: 
den123