zoukankan      html  css  js  c++  java
  • mono中显示debug信息(filename/lineno)

    一直发现 mono 的 traceback 没有 fliename、lineno,很奇怪。研究了下,原来编译和运行时要加参数的。

    dmcs -debug /r:xunit.dll /t:library MyTest.cs

    mono --debug xunit.console.exe MyTest.dll
     
    MyTest.FooTest [FAIL]
       Assert.Equal() Failure
       Expected: 4
       Actual:   3
       Stack Trace:
         at MyTest.FooTest () [0x00000] in /Users/kasicass/sandbox/csharp/mytest/MyTest.cs:8 
         at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
         at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
  • 相关阅读:
    三数之和
    167
    二分搜索树
    687
    索引堆
    二分查找 leetcode704
    leetcode 56合并区间 java
    leetcode 1046
    堆的数据结构java
    leetcode 493
  • 原文地址:https://www.cnblogs.com/shiningrise/p/5745168.html
Copyright © 2011-2022 走看看