Freigeben über


Debugging 64-bit applications using Visual Studio 2005

A short note on this issue that I came across recently. Let’s say we are trying to debug a managed/unmanaged code in Visual Studio 2005 in a 64-bit machine. We complete the code and hit F5 (debug the application), and land up with the following error:

Error while trying to run project: Unable to start debugging.
The components for the 64-bit debugger are not registered. Please repair your Visual Studio 2005 Remote Debugger installation via 'Add or Remove Programs' in Control Panel.

Okay all that we are doing is debugging an application in the local machine. So why should there be a problem with the remote debugger installation? Here is some background on how debugging works in 64-bit environment that explains why you see this error message.

Even on a 64-bit machine, Visual Studio runs as a 32-bit application. This means that Visual Studio would run in the Windows-on-Windows (WoW64) layer. It would not be possible to attach a 32-bit debugger to a 64-bit process. However, if you want to debug a 64-bit application, there is something special that Visual Studio does to make this possible. We would achieve this pseudo-remotely. You are running the debugger on the same machine as the process but debugging is done through the remote debugger. All this happens behind the scenes and you as a developer would not need to do anything special.

Now, if you are seeing this error on a 64-bit machine, I would assume that the remote debugging components were not included during the Visual Studio installation process. All that we would need to do is install the remote debugging components using the link below following the instructions under the section ‘To install remote debugging components (non-SQL Server 2005)’. And yeah, we would not need to worry about the remote debugging permissions since we are just debugging an application in the local machine in this case.

 

Link for reference: