What is expected in the “Output” field of Monodeve

2019-02-15 20:07发布

问题:

I can't use normal debugging in Monodevelop, so I am trying to debug remotely as described here.
Here is the whole procedure:


In a terminal, type:

export MONODEVELOP_SDB_TEST="YES"
monodevelop &

Monodevelop starts.

  1. Open your solution
  2. Run -> Run With -> Custom Command Mono Soft Debugger
  3. Fill the fields:
    1. Command: /home/nico/src/CmisSync/bin/SparkleShare.exe
    2. Arguments: -debug --debugger-agent=transport=dt_socket,address=127.0.0.1:10000 (not sure if needed)
    3. IP: 127.0.0.1
    4. Port: 10000
    5. Output: 1
  4. Press Listen
  5. Back to the terminal, press:

mono --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:10000 ./bin/SparkleShare.exe


PROBLEM: Monodevelop crashes at step 4, as soon as I have pressed Listen:

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

Same error when I press Connect instead of Listen.

Maybe I entered the wrong value for Output? The source code shows that an integer value is expected.

This part of Monodevelop is very experimental (they are not planning to implement exception handling), so sending them a bug report would not be productive in this case... I am pretty sure I just misunudertood something.

回答1:

Here is the correct procedure:

In a terminal, type:

export MONODEVELOP_SDB_TEST="YES"
monodevelop &

Monodevelop starts.

  1. Open your solution
  2. Run -> Run With -> Custom Command Mono Soft Debugger
  3. Fill the fields:
    1. Command: Empty
    2. Arguments: Empty
    3. IP: 127.0.0.1
    4. Port: 10000
    5. Output: Empty
  4. Press Listen
  5. Back to the terminal, press:

mono --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:10000 ./bin/SparkleShare.exe

Now application can be debugged in Monodevelop!