Dot Net Tips and Tricks

Custom Search

Archive for January, 2008

Visual Studio 2008 RTM

Well it’s finally here. We’ve all been waiting for the final version and the wait is over. We have already converted our applications to the .Net 3.5 framework and the conversion was completely painless. No conflicts whatsoever. The 3.5 framework still uses the .Net 2.0 runtime, so the conversion should happen without major problems if coming from a 2.0 or 3.0 codebase.

I’ll update more as the weeks progress on the new features and our experiences with them.

Garick

No comments

Debugging 64-bit applications using Visual Studio 2008

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 2008 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 2008 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.

1 comment