http://bugs.winehq.org/show_bug.cgi?id=22870
Summary: Visual Studio remote debugger msvsmon.exe does not launch debug target Product: Wine Version: 1.1.44 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: ninevoltz@metalink.net
msvsmon.exe does not work on Wine, the monitor will start and can connect with Visual Studio's debugger, but it will not start the target program to debug. I am attempting to debug PuTTY's Pageant program which also does not work properly in Wine. I also tried debugging with MinGW's gdb and gdb crashes.
http://bugs.winehq.org/show_bug.cgi?id=22870
--- Comment #1 from John Voltz ninevoltz@metalink.net 2010-05-25 08:52:42 --- Created an attachment (id=28270) --> (http://bugs.winehq.org/attachment.cgi?id=28270) Log using +loaddll,+relay
This is a trace while attempting to debug PuTTY pageant. I'm able to connect remotely, then after trying to start the debug session, Visual Studio hangs and pageant never actually starts up.
http://bugs.winehq.org/show_bug.cgi?id=22870
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net 2012-01-29 07:59:08 CST --- Hello,
which Visual Studio version was used? Is this bug still present?
Regards
http://bugs.winehq.org/show_bug.cgi?id=22870
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Visual Studio remote |Microsoft Visual Studio |debugger msvsmon.exe does |2008: debugging |not launch debug target |applications through remote | |debugger "msvsmon.exe" | |fails
--- Comment #3 from Anastasius Focht focht@gmx.net 2012-02-15 16:35:44 CST --- Hello,
the log is badly interleaved. Next time use "append" mode (>>).
Judging from the trace log this might be Visual Studio 2008.
--- snip --- ... 0009:Call KERNEL32.CreateProcessW(0032fa54 L"C:\Remote_Debugger\msvsmon.exe",0013d4a8 L"C:\Remote_Debugger\msvsmon.exe /CHILDSERVER 5c 54 58 4c 48 "john.voltz@localhost" /silent-",00000000,00000000,00000001,00000084,00000000,00000000,0032f9c4,0032fa28) ret=0040e214 ... 0009:Ret KERNEL32.CreateProcessW() retval=00000001 ret=0040e214 ... 001b:Call KERNEL32.CreateProcessW(008fda0c L"C:\Remote_Debugger\msvsmon.exe",00141020 L"C:\Remote_Debugger\msvsmon.exe /CHILDSERVER 84 /noauth 80 4c 48 "localhost:4015" /silent-",00000000,00000000,00000001,00000084,00000000,00000000,008fd97c,008fd9e0) ret=0040e214 ... 001b:Ret KERNEL32.CreateProcessW() retval=00000001 ret=0040e214 ... 001b:Call KERNEL32.CreateFileW(008fd858 L"\\.\pipe\Microsoft.VisualStudio.9.0.Remote\john.voltz",c0000000,00000003,00000000,00000003,00110080,00000000) ret=0046d9ea ... 001f:Starting process L"C:\Remote_Debugger\msvsmon.exe" (entryproc=0x414b62) ... 001f:Call KERNEL32.CreateProcessW(0033f8dc L"C:\Remote_Debugger\msvsmon.exe",0013d758 L"C:\Remote_Debugger\msvsmon.exe /CHILDSERVER 7c /noauth 0 4c 48 "localhost:4015" /silent-",00000000,00000000,00000001,00000084,00000000,00000000,0033f84c,0033f8b0) ret=0040e214 ... 001f:Ret KERNEL32.CreateProcessW() retval=00000001 ret=0040e214 ... 0024:Call KERNEL32.CreateProcessW(009fe730 L"C:\putty-src\WINDOWS\MSVC\PAGEANT\Debug\pageant.exe",009dc524 L""C:\putty-src\WINDOWS\MSVC\PAGEANT\Debug\pageant.exe" C:\me.ppk",00000000,00000000,00000001,04000016,00000000,006e5204 L"C:\putty-src\WINDOWS\MSVC\PAGEANT\Debug\",00679aa4,00afe9d0) ret=00476799 ... 0026:Call KERNEL32.__wine_kernel_init() ret=7bc4f353 ... 0024:Ret KERNEL32.CreateProcessW() retval=00000001 ret=00476799 ... 0024:Call KERNEL32.WaitForDebugEvent(00afea08,00000032) ret=004702b6 0024:Ret KERNEL32.WaitForDebugEvent() retval=00000001 ret=004702b6 ... 0023:Starting process L"C:\Remote_Debugger\msvsmon.exe" (entryproc=0x414b62) ... --- snip ---
Refining summary.
Regards
http://bugs.winehq.org/show_bug.cgi?id=22870
Helder 'Lthere' Magalhães helder.magalhaes@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |helder.magalhaes@gmail.com
--- Comment #4 from Helder 'Lthere' Magalhães helder.magalhaes@gmail.com --- I've run msvcmon.exe with success, although it's a quite older version (Visual Studio .NET, a.k.a. 2002).
The command-line used is: msvcmon.exe -anyuser -maxsessions 1
Note that the 'anyyuser' is insecure, although it helps working around authentications in Wine+Linux (and even in Windows when domain controllers versus stand-alone machines are involved); the 'maxsessions' is only to make sure no one else gets in, as security is already lowered quite a bit.
Regarding comment 0: [...] the monitor will start and can connect with Visual Studio's debugger, but it will not start the target program to debug [...]
Actually, programs are not being started from within Visual Studio; instead, the debugger is attached once they are already running. If that was the case, try using that variation.
When debugging an application's start-up, one may use the quick+dirty trick of adding an ASSERT(FALSE) or similar to the very beginning of the application. That will trigger a "crash" dialog, which buys enough time to attach the debugger. Some experiments showed that pressing 'Retry' sometimes doesn't behave as expected (breaking into the debugger) and a "real" crash is triggered instead - press 'Ignore' for these fake assertions.
https://bugs.winehq.org/show_bug.cgi?id=22870
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |RESOLVED URL| |http://download.microsoft.c | |om/download/8/1/d/81d3f35e- | |fa03-485b-953b-ff952e402520 | |/VS2008ProEdition90dayTrial | |ENUX1435622.iso Resolution|--- |WORKSFORME
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
the "hang" in the IDE is bug 8332 You can check that by clicking 'refresh' on remote process list a few times.
The terminal the IDE runs in should spit out:
--- snip --- err:winediag:IcmpCreateFile Failed to use ICMP (network ping), this requires special permissions. --- snip ---
If you get "Unable to attach to the process. Operation not supported" after setcap 'cap_net_raw' you also need to add ptrace caps ('cap_net_raw,cap_sys_ptrace=eip').
In general you seem to have a misconception on how the remote debugging is supposed to work. It's as Helder said: you attach to the remote process.
I verified that attaching to remote processes works.
Download 'Visual Studio 2008 Service Pack 1 Remote Debugger ':
http://www.microsoft.com/en-us/download/confirmation.aspx?id=10647
(install in its own WINEPREFIX or better to remote machine)
Put the thing without status window and security disabled into systray:
--- snip --- $ wine ./msvsmon.exe /nostatus /noauth /anyuser /nofirewallwarn /nosecuritywarn --- snip ---
In VS 2008 IDE select remote transport and after the remote process list is displayed the process to attach to.
I wrote a small test app that displays a message box and triggers a segfault after dismissal. After attaching and triggering the fault, the remote debugger/server successfully delivered all information to local IDE, crash location, stack frames etc.
Breakin without actual exception doesn't work due to bug 25462
Anyway, since simple remote debugging works and OP's issue was rather due to misconception I'm resolving the bug as 'worksforme' (instead of invalid/dupe).
I found indeed several other problems or things that need to be explained related to the IDE and the debugger but those deserve their own bugs. I'll probably create them when I get more time/better mood. Meta bugs such as "debugging doesn't work" should be avoided. Be very specific.
$ sha1sum VS2008ProEdition90dayTrialENUX1435622.iso bf671c81c0d097f4261b232c80b38bd9549294b0 VS2008ProEdition90dayTrialENUX1435622.iso
$ du -sh VS2008ProEdition90dayTrialENUX1435622.iso 3.4G VS2008ProEdition90dayTrialENUX1435622.iso
$ wine --version wine-1.7.31-99-g5ecea72
Regards
https://bugs.winehq.org/show_bug.cgi?id=22870
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED CC| |nerv@dawncrow.de
--- Comment #6 from André H. nerv@dawncrow.de --- closing "worksforme"
https://bugs.winehq.org/show_bug.cgi?id=22870
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://download.microsoft.c |https://web.archive.org/web |om/download/8/1/d/81d3f35e- |/20200226201149/http://down |fa03-485b-953b-ff952e402520 |load.microsoft.com/download |/VS2008ProEdition90dayTrial |/8/1/d/81d3f35e-fa03-485b-9 |ENUX1435622.iso |53b-ff952e402520/VS2008ProE | |dition90dayTrialENUX1435622 | |.iso
https://bugs.winehq.org/show_bug.cgi?id=22870
--- Comment #7 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download links via Internet Archive for documentation.
Visual Studio 2008 Service Pack 1 Remote Debugger (comment #5)
https://web.archive.org/web/20200804042412/https://download.microsoft.com/do...
https://www.virustotal.com/gui/file/3662a89b59b7bad349c6e83f4068f54fc0eb37e1...
$ sha1sum rdbgsetup_x86.exe 1aceddb400427c47aa4bdb0413e720d26b8a88fd rdbgsetup_x86.exe
$ du -sh rdbgsetup_x86.exe 4.2M rdbgsetup_x86.exe
====
https://web.archive.org/web/20200803210333/https://download.microsoft.com/do...
https://www.virustotal.com/gui/file/cc5af9e22b93bd22a7640e58583a05458823098f...
$ sha1sum rdbgsetup_x64.exe 5ceccada58c6f9032cb9e48f10775eb0c215e223 rdbgsetup_x64.exe
$ du -sh rdbgsetup_x64.exe 7.4M rdbgsetup_x64.exe
Regards