Ubuntu 12.04,Mono 2.10.8.1-5'mono --trace myapp'?
我已经构建了MonoDevelop默认创建的“hello world”控制台应用程序。它按预期运行。当我添加了跟踪选项(定向到一个文件,或者没有),我得到的东西是这样的:
[0x7f24da6eb740: 0.00000 0] ENTER: (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)([System.OutOfMemoryException:0x7f24da52af60], 0x7fff953e6510, (nil), 0x40e79a70,)
[0x7f24da6eb740: 0.00012 1] ENTER: System.OutOfMemoryException:.ctor (string)(this:0x7f24da52af60[System.OutOfMemoryException monotracetest.exe], [STRING:0x7f24da551e70:Out of memory],)
[0x7f24da6eb740: 0.00021 2] ENTER: System.SystemException:.ctor (string)(this:0x7f24da52af60[System.OutOfMemoryException monotracetest.exe], [STRING:0x7f24da551e70:Out of memory],)
[0x7f24da6eb740: 0.00030 3] ENTER: System.Exception:.ctor (string)(this:0x7f24da52af60[System.OutOfMemoryException monotracetest.exe], [STRING:0x7f24da551e70:Out of memory],)
[0x7f24da6eb740: 0.00031 3] LEAVE: System.Exception:.ctor (string)
..going对栈溢出了近900条,内存,和更多的无辜样子的东西。
我还没有发现任何有关'--help-trace'之外跟踪选项的文档。我应该期待什么?这实际上是报告问题吗?当我在try catch块中包装'console.writeline(“hello world”)'时,不会引发异常。 (当然,大概一个未处理的异常会使程序崩溃。)
我原来的程序是测试调用一个本地代码库,然后我将它减少到这个以查看它失败的位置。
我该如何将小麦与糠separate分开?
所以它会提前构建异常对象,以便它们在需要时可用。足够合理。但是,由于它需要这样做,我认为会有一个简单的标志来关闭所有的功能,或者甚至默认关闭。我想--trace = N:mynamespace是要走的路。谢谢! – mickeyf