64-Bit Insider Volume 1 Issue 10
64-Bit Insider Volume 1 Issue 10
Volume I, Issue 10
Fix Bugs
When planning the development of 64-bit application, you might assume that it would be
ideal to complete all development tasks on a 64-bit server, such as the Itanium or the
Intel EM64T. But this is not always the case.
Visual Studio 2005 is packed with a plethora of great new features. And one of the most
valuable features gives you the ability to remotely debug an application on a Windows®
64-bit computer from any remote 32-bit Windows® system. If you are currently
debugging 64-bit code in Visual Studio that is running on an EM64T, you are already
using remote debugging. The only way that a 32-bit application like Visual Studio can
interact at the debug level with a 64-binary is out-of-process; remember that 32-bit code
and 64-bit code cannot exist within the same process space. Even though you did not
have to set anything in your integrated development environment, Visual Studio makes
all the necessary changes so that you are remotely debugging without even knowing it.
Note If you have installed Microsoft SQL Server™ 2005 on your 64-bit server,
then the Remote Debugger is probably already installed. Debugging SQL Server
2005 will be covered in a future issue of the 64-bit Insider newsletter.
2. Start the remote debugger in the 64-bit server by navigating to Start > Programs
> Microsoft Visual Studio 2005 > Visual Studio Tools > Visual Studio 2005
Remote Debugger (either Itanium or x64, depending on your architecture).
3. Set up special permissions in the “Visual Studio Remote Debugging Monitor” by
creating several user accounts with debugging permissions granted.
4. Select Tools > Options from the “Remote Debugger Monitor.” From the dialog
box that opens, specify which users will be allowed to connect to your server
remotely. While the example in Figure 3 shows “No Authentication,” for security
reasons, you should never select this option in your server. For more information
about how to create the necessary accounts with the correct debugging
permissions, please visit:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/vsdebug/html/vxtskinstallingdcom.asp
Configuring the Remote Debugging Client
After you have finished setting up the remote debugger, you are ready to configure the
debugging clients so that they can access the server. Follow these steps to configure the
remote debugging client.
1. Open project properties, access the Debugging node, and then select Remote
Windows Debugger from the list. Figure 2 shows the dialog box, filled out with
information for a sample C++ application that needs to be debugged.
From this point on, you should be able to follow the same debugging procedure you
would otherwise follow if you were debugging a 32-bit application. For example, setting
up breakpoints and stepping in and out of methods haven’t changed. However, some
processes will look slightly different. For example, while debugging select Debug >
Windows > Registers from the Visual Studio menu. You will see that your registers are
64-bit in size. (See Figure 3.)
Summary
Remote Debugging is very similar to the usual debugging techniques used in previous
versions of Visual Studio. The main differences are found when setting up and running
the remote debugging server, and when configuring your project properties—both
activities have been addressed in this issue of the 64-bit Insider newsletter.
Remote debugging is not always required when building 64-bit applications, but it is
helpful if you must share a 64-bit server with other colleagues. In addition, when writing
an application in Visual Studio 2005 that will run on an Itanium 2 server, remote
debugging might be the only way to debug the application. Whatever your case may be,
we hope you find this newsletter helpful when setting up your development environment.