Closed dermeister0 closed 5 years ago
I ran the extension under debugger.
System.IO.IOException: DWP Handshake failed.
Server stack trace:
at Mono.Debugger.Soft.Connection.Connect()
at Mono.Debugger.Soft.VirtualMachine.connect()
at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep, TextWriter logWriter)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectCallback.EndInvoke(IAsyncResult result)
at Mono.Debugger.Soft.VirtualMachineManager.EndConnect(IAsyncResult asyncResult)
at Mono.Debugger.Soft.VirtualMachineManager.Connect(IPEndPoint endpoint, IPEndPoint consoleEndpoint, TextWriter logWriter)
at Mono.Debugger.Soft.VirtualMachineManager.Connect(IPEndPoint endpoint, TextWriter logWriter)
at Microsoft.MIDebugEngine.DebuggedProcess.StartDebugging()
at MonoRemoteDebugger.Debugger.VisualStudio.AD7Engine.LaunchSuspended(String pszServer, IDebugPort2 port, String exe, String args, String dir, String env, String options, enum_LAUNCH_FLAGS launchFlags, UInt32 hStdInput, UInt32 hStdOutput, UInt32 hStdError, IDebugEventCallback2 ad7Callback, IDebugProcess2& process)
It always fails for the first time (when need to copy files) and works for the second time. debugSessionStarted in AttachDebugger is false for the first time and true when application has not changed.
It works better under debugger. I think an error happens when multiple tasks run simultaneously in this place:
var debugSessionStarted = await session.RestartDebuggingAsync(timeout);
if (!debugSessionStarted)
{
await session.TransferFilesAsync();
await session.WaitForAnswerAsync(timeout);
}
I think that cancellation token should be used in WaitForAnswerAsync to cancel communication.ReceiveAsync task by timeout.
Can you test after updating mono to latest version? My current mono version is v5.0.1.
Installed product versions
Description
Can't debug a simple application remotely. Error during managed I/O message is shown.
Steps to recreate
I use Docker container to run MonoRemoteDebugger.Server.
Current behavior
Debug process does not start.
Dockerfile:
I try to debug console application for .NET 4.6.2 or .NET 4.0.
MDB file is generated successfully. The application works.
Current behavior
The debug process does not start.
Expected behavior
Debug process starts.