Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Debugger.Break crashes nCrunch TaskRunner
DamirArh
#1 Posted : Saturday, March 8, 2014 8:25:34 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/8/2014(UTC)
Posts: 9
Location: Slovenia

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Recently I noticed Visual Studio not responding for short periods of time while nCrunch was running tests in the background. I found corresponding Application Error events in the event log because nCrunch.TaskRunner451.x86.exe was crashing. After further investigation I managed to consistently reproduce the crashes every time Debugger.Break was called within a test being run.

I can prevent these calls being made from the tests, but still it would be great if you could avoid the runner crashing in such cases.
Remco
#2 Posted : Saturday, March 8, 2014 11:05:23 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting!

Unfortunately, there is nothing NCrunch can do about the task runner crashing in this situation. The Debugger.Break method is responsible for this action, and NCrunch cannot intercept its activities. You'll find that other test runners have the same behaviour in this situation.

The Debugger.Break method falls into a similar category to Debugger.Launch, MessageBox.Show, etc. NCrunch has no way to handle this code as the code isn't designed to be executed using an automated test.

If you wish to disable the behaviour for NCrunch execution, you may want to look into using an override such as:

#if !NCRUNCH
Debugger.Break();
#endif
1 user thanked Remco for this useful post.
DamirArh on 3/8/2014(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.024 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download