Option to enter debugger when churn mode makes a test fail
I would like to use churn mode for a single test and make NCrunch enter the debugger as soon as churn mode was able to fail the test.
-
CTO commented
I'm surprised this feature request has been ignored for 5 years... it seems very useful, and I'm definitely looking forward to it.
The option to add a System.Diagnostics.Debugger.Launch() can probably do the job, but it requires changing code and it would be much more convenient to have an NCrunch option like "Debug churn selected test"
UPDATE: System.Diagnostics.Debugger.Launch() is not a solution. Having that line starts the debugger every time the test is run even without churn, an it shows a modal dialog for the user to choose which process to attach to. And because NCrunch keeps "churning" until it sees a failure, I'm presented with multiple of those dialogs, some of which fail to attach because the process has already exited.
Please, will you consider adding this new feature?
-
Vincent D commented
You can set the following line in the "if" code branch that is supposed to fail and it start a debugger in the failling context :
System.Diagnostics.Debugger.Launch();
-
Anonymous commented
That would indeed be a huge timesaver. I just spent over 2 hours debugging a pretty complex integration test with trace messages only because the failure only manifested about every 30 test runs... :\