我can't use normal debugging in Monodevelop,所以我正在尝试debug remotely as described here 这是整个过程:
在终端中输入:
export MONODEVELOP_SDB_TEST="YES"
monodevelop &
Monodevelop开始。
Run -> Run With -> Custom Command Mono Soft Debugger
/home/nico/src/CmisSync/bin/SparkleShare.exe
-debug --debugger-agent=transport=dt_socket,address=127.0.0.1:10000
(不确定是否需要)127.0.0.1
10000
1
Listen
mono --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:10000 ./bin/SparkleShare.exe
问题:一旦我按下Listen
,Monodevelop就会在第4步崩溃:
System.InvalidOperationException: Standard output has not been redirected
at System.Diagnostics.Process.get_StandardOutput () [0x00043] in /build/buildd/mono-2.10.8.1/mcs/class/System/System.Diagnostics/Process.cs:663
at MonoDevelop.Core.Execution.ProcessWrapper.CaptureOutput () [0x00000] in <filename unknown>:0
at System.Threading.Thread.StartInternal () [0x00016] in /build/buildd/mono-2.10.8.1/mcs/class/corlib/System.Threading/Thread.cs:703
当我按Connect
而不是Listen
时出现相同的错误。
也许我为Output
输入了错误的值? The source code shows that an integer value is expected
Monodevelop的这部分非常具有实验性(它们不打算实现异常处理),因此向他们发送错误报告在这种情况下效率不高......我很确定我只是误解了一些东西。
答案 0 :(得分:3)
这是正确的程序:
在终端中输入:
export MONODEVELOP_SDB_TEST="YES"
monodevelop &
Monodevelop开始。
Run -> Run With -> Custom Command Mono Soft Debugger
127.0.0.1
10000
Listen
mono --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:10000 ./bin/SparkleShare.exe
现在可以在Monodevelop中调试应用程序了!