在使用任何类型的模拟(Moq,FakeItEasy,创建具有Castle.Core的代理,......)时,在Xamarin Studio或VS4M中调试测试(TDD)时,我在Mono调试器中遇到了严重崩溃。
Mono.Debugger.Soft.CommandException: Debuggee returned error code 200.
at Mono.Debugger.Soft.VirtualMachine.ErrorHandler (System.Object sender, Mono.Debugger.Soft.ErrorHandlerEventArgs args) [0x0006f] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:350
at Mono.Debugger.Soft.Connection.SendReceive (Mono.Debugger.Soft.Connection+CommandSet command_set, System.Int32 command, Mono.Debugger.Soft.Connection+PacketWriter packet) [0x000fe] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1545
at Mono.Debugger.Soft.Connection.Type_GetPropertyCustomAttributes (System.Int64 id, System.Int64 field_id, System.Int64 attr_type_id, System.Boolean inherit) [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:2239
at Mono.Debugger.Soft.PropertyInfoMirror.GetCAttrs (Mono.Debugger.Soft.TypeMirror type, System.Boolean inherit) [0x0003d] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs:128
at Mono.Debugger.Soft.PropertyInfoMirror.GetCustomAttributes (System.Boolean inherit) [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs:113
at Mono.Debugging.Soft.SoftDebuggerAdaptor.OnGetTypeDisplayData (Mono.Debugging.Evaluation.EvaluationContext ctx, System.Object type) [0x00190] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs:1626 0 mono 0x00111a66 mono_handle_native_sigsegv + 342
1 mono 0x00168561 sigabrt_signal_handler + 145
2 libsystem_platform.dylib 0x9ebdd79b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libsystem_c.dylib 0x94016c38 abort + 156
5 libsystem_malloc.dylib 0x9ba0d292 free + 433
6 mono 0x00142d88 debugger_thread + 29784
7 mono 0x0039e56d inner_start_thread + 413
8 libsystem_pthread.dylib 0x94644780 _pthread_body + 138
9 libsystem_pthread.dylib 0x946446f6 _pthread_body + 0
10 libsystem_pthread.dylib 0x94641f7a thread_start + 34
任何人都有解决方法:(使用Windows / VS / .Net ;-)
public interface IFoo
{
void Bar();
}
[TestFixture()]
public class Test
{
[Test()]
public void TestCase()
{
var inspectMeForAHardCrash = new Moq.Mock<IFoo>();
// FYI: Non-inpection will cause the debugger to fault, but no hard crash
}
}
Mono JIT编译器版本4.8.0(单声道4.8.0分支/ 0494d70 2017年3月2日星期二21:19:48 2017)