<p>Is it possible to install the x86 Remote Debugger as a Service on a 64bit machine?  I need to attach a debugger to managed code in a Session 0 process.  The process runs 32bit but the debugger service that gets installed is 64bit and wont attach to the 32bit process.  </p>

<p>I tried creating the Service using the SC command, and was able to get the service to start, and verified that it was running in Task manager processes.  However, when I tried to connect to it with visual studio, it said that the remote debugger monitor wasn't enabled.  When I stopped the x86 service, and started the x64 service and it was able to find the monitor, but still got an error.</p>

<p>Here is the error when I try to use the remote debugger:
Unable to attach to the process. The 64-bit version of the Visual Studio Remote Debugging Monitor (MSVSMON.EXE) cannot debug 32-bit processes or 32-bit dumps. Please use the 32-bit version instead.</p>

<p>Here is the error when I try to attach locally:
Attaching to a process in a different terminal server session is not supported on this computer. Try remote debugging to the machine and running the Microsoft Visual Studio Remote Debugging Monitor in the process's session.</p>

<p>If I try to run the 32bit remote debugger as an application, it wont work attach b/c the Remote Debugger is running in my session and not in session 0.</p>

[{'answer_id': 77920, 'author': 'Michael Burr', 'author_id': 12711, 'author_profile': 'https://Stackoverflow.com/users/12711', 'pm_score': 2, 'selected': False, 'text': '<p>I haven\'t tried this, but here\'s a suggestion anyway:</p>\n\n<p>Try installing the x86 remote debugger service manually.</p>\n\n<pre><code>sc create "Remote Debugger" binpath= "C:\\use\\short\\filename\\in\\the\\path\\x86\\msvsmon.exe /service msvsmon90"\n</code></pre>\n\n<p>Two notes:</p>\n\n<ul>\n<li>You\'ll need to use short filenames\nin the path to msvsmon.exe to\nprevent having to quote the path\n(since the whole command needs to be\nquoted)</li>\n<li>there must be a space after the\n"binpath=" (and no space before the\n\'=\' character).  Whoever wrote the\ncommand line parser for the sc\ncommand should be cursed.</li>\n</ul>\n\n<p>Then you can use the services.msc control panel applet to get it running with the right credentials.</p>\n\n<p>You\'ll probably have to stop or maybe even delete the existing x64 remote debugger service.</p>\n'}, {'answer_id': 445514, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 5, 'selected': True, 'text': '<p>This works on my machine(TM) after installing rdbgsetup_x64.exe and going through the configuration wizard:</p>\n\n<pre><code>sc stop msvsmon90\nsc config msvsmon90 binPath= "C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\Remote Debugger\\x86\\msvsmon.exe /service msvsmon90"\nsc start msvsmon90\n</code></pre>\n'}, {'answer_id': 445540, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>I can confirm that what you want to do will indeed work. I often connect my 32 bit xp worstation to a x64 win2003 server with VS2008 remote debugger.</p>\n'}, {'answer_id': 1866531, 'author': 'Andras Zoltan', 'author_id': 157701, 'author_profile': 'https://Stackoverflow.com/users/157701', 'pm_score': 3, 'selected': False, 'text': '<p>We had the same problem when trying to remote debug a website that is running as 32 bit inside 64 bit IIS.</p>\n\n<p>You can also do this:</p>\n\n<ul>\n<li>Stop the default debugging service\n(which will be x64 as the installer\nwill have been clever and configured\nthat one to run).</li>\n<li>Navigate to the Remote Debugger start\nmenu folder and run the x86 debugging\nservice.  Ignore the warning about<br>\n32bit/64bit.</li>\n<li>Open the Tools->Options window of the\nremote debugger app window and make<br>\nnote of the value in the \'Server<br>\nName\' text box.</li>\n<li>Now you can attach your visual studio\nto it by copying the \'Server Name\'<br>\nvalue into the \'Qualifier\' text/combo\nbox on the Attach To Process dialog<br>\nof Visual Studio.</li>\n</ul>\n\n<p>On a related note, there is also a low-level bug with Kerberos authentication if you are attaching from Windows 2008/7/Vista to a 2003 machine, reported to MS (and then closed as \'external\') via Connect here: <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=508455" rel="nofollow noreferrer">https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=508455</a></p>\n'}, {'answer_id': 26037339, 'author': 'GreatDane', 'author_id': 1796802, 'author_profile': 'https://Stackoverflow.com/users/1796802', 'pm_score': 0, 'selected': False, 'text': '<p>Worked for me without installing additional software. I just copied the <code>C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\Remote Debugger</code> folder on the VM and started the <code>msvsmon.exe</code> from the <code>x86</code> folder. Both my guest and host are <code>x64</code>.</p>\n'}, {'answer_id': 43326533, 'author': 'Mike Grimm', 'author_id': 1913997, 'author_profile': 'https://Stackoverflow.com/users/1913997', 'pm_score': 1, 'selected': False, 'text': '<p>1) Install the x64 version. This also installs the x86 debugger but does not create a shortcut.</p>\n\n<p>2) You can find the executable for x86 process debugging here... C:\\Program Files\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Remote Debugger\\x86\\msvsmon.exe</p>\n\n<p>3) If you want to, pin it to the task bar.</p>\n'}, {'answer_id': 48541210, 'author': 'SeyedPooya Soofbaf', 'author_id': 866761, 'author_profile': 'https://Stackoverflow.com/users/866761', 'pm_score': 0, 'selected': False, 'text': '<p>Sometimes this error occurred, I just close visual studio and open it again, everything is OK!</p>\n\n<p>Very strange behavior from vs</p>\n'}, {'answer_id': 59494652, 'author': 'Mukus', 'author_id': 1497565, 'author_profile': 'https://Stackoverflow.com/users/1497565', 'pm_score': 0, 'selected': False, 'text': '<p>I ran into this issue today (64 bit OS and VS 2019). I changed Configuration to use x64 for the project, IISExpress to use 64 bit and Platform target to be x64. It still used the 32 bit debugger and complained. Finally, when I enabled Script Debugging it started using the 64 bit debugger. So I would say the combination of all did the trick.</p>\n'}]
['https://Stackoverflow.com/questions/76939', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3291/']