RTX MiniTutorial REMOTE DEBUGGING WITH 64-BIT WINDOWS HOST AND 32-BIT TARGET RTX 2012
RTX MiniTutorialREMOTE DEBUGGING WITH 64-BIT
WINDOWS HOST AND 32-BIT TARGETRTX 2012
Copyright © 1996-2015 by IntervalZero, Inc. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means, graphic, electronic, or mechanical, includingphotocopying, and recording or by any information storage or retrieval system without the prior written permission of IntervalZero, Inc.unless such copying is expressly permitted by federal copyright law.
While every effort has been made to ensure the accuracy and completeness of all information in this document, IntervalZero, Inc.assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document,its updates, supplements, or special editions, whether such errors, omissions, or statements result from negligence, accident, or anyother cause. IntervalZero, Inc. further assumes no liability arising out of the application or use of any product or system describedherein; nor any liability for incidental or consequential damages arising from the use of this document. IntervalZero, Inc. disclaims allwarranties regarding the information contained herein, whether expressed, implied or statutory, including implied warranties ofmerchantability or fitness for a particular purpose.
IntervalZero, Inc. reserves the right to make changes to this document or to the products described herein without further notice.
Microsoft, MS, and Win32 are registered trademarks and Windows 7, Windows Vista, Windows XP, and Windows Server 2003 aretrademarks of Microsoft Corporation.
All other companies and product names may be trademarks or registered trademarks of their respective holders.
MiniTutorial: Remote Debugging with 64-bit Windows Host and32-bit Target
IZ-DOC-X86-0058-R3 July 2015
400 Fifth Avenue
Fourth Floor
Waltham, MA 02451
Phone: 781-996-4481
www.intervalzero.com
Overview64-bit Windows 7-based PCs are becoming the standard development platform. With this in mind,IntervalZero designed the RTX 2012 SDK to install on a 64-bit Windows operating system.
Although the IntervalZero RTX runtime currently only supports 32-bit Windows, you can develop and debugyour RTX 2012 applications with a 64-bit Windows platform. This can be accomplished through a Host /Target debug scenario. This allows you to:
l Build and Debug using anyWindows based 64-bit Host
l Remotely connect to anyWindows based 32-bit Target
l Use Ethernet between the Host and Target
NOTE: The instructions in this MiniTutorial correspond with RTX 2012.
System Requirements
Host Requirements Target Requirements Shared Requirements
Windows 64-bit Operating System Windows 32-bit Operating System Ethernet connection between theHost and Target
Microsoft Visual Studio 2010,2008, or 2005
RTX 2012 Runtime
Microsoft Remote DebuggingMonitor (MSVSMON.exe)
IZ-DOC-X86-0058-R3 1 Overview
Splitting a Bundled Activation KeyA bundled activation key for RTX combines multiple activation keys for different RTX components. Forinstance, a bundled activation keymay include activation keys for the RTX SDK, RTX Runtime, and RTX RT-TCP/IP, as shown in this example:
RTX-110-1234-1234-1234-1234-TCP-110-1234-1234-1234-1234-SDK-110-1234-1234-1234-1234
You can split a bundled activation key into separate keys in order to activate the RTX SDK (headers, libraries,and wizards) on the Host machine, and activate the RTX Runtime on the Target machine.
You will want to break the bundled key so that one key includes the RTX Runtime and RT-TCP/IP activation,and the other includes just the RTX SDK activation. Using the example above, you would split the bundledkey as follows:
l Runtime key: RTX-110-1234-1234-1234-1234-TCP-110-1234-1234-1234-1234
l SDK key: SDK-110-1234-1234-1234-1234
IZ-DOC-X86-0058-R3 2 Overview
Setup
Target SetupSetup of the Target system requires the following steps.
Configure RTX remote debug support:
1. Click Start > All Programs > IntervalZero > RTX 2012 > RTX Properties.
2. On the Debug tab, click the User level debugging radio button, and then check the Accept remotedebug connections via MSVSMON box.
IZ-DOC-X86-0058-R3 3 Setup
3. Click Apply.
4. On the Control tab, ensure that the RTX subsystem is running. If RTX Subsystem drivers are notstarted, click the Start button.
Start MSVSMON:
1. On the Host machine, locate the Visual Studio installation directory (C:\Program Files\MicrosoftVisual Studio <version> by default) and navigate to \Common7\IDE\Remote Debugger\x86.
2. Copy the x86 directory to the Target machine.
3. On the target system, in the x86 folder, double-click the file msvsmon.exe.
4. If Windows Firewall is enabled on the Target machine, the Configure Firewall for Remote Debuggingprompt appears.
5. Choose one of the following:
l Unblock remote debugging from computers on the local network (subnet)
l Unblock remote debugging from any computer
6. Click OK.
7. In the Visual Studio Remote Debugging window, click Tools > Options.
IZ-DOC-X86-0058-R3 4 Setup
The Options dialog appears:
8. Do the following:
a. Copy the server name.
b. Click No Authentication (native only) to allow for an open TCP connection.
c. Click Allow any user to debug.
d. Increase theMaximum idle time as needed.
9. Click OK.
IZ-DOC-X86-0058-R3 5 Setup
Run the RTSS application:
1. Launch the Command Prompt as Administrator.
2. Type rtssrun /y followed by the full path to the application. If the path name contains spaces, itmust be enclosed in quotes. For example:
NOTE: The /y flag is required to run the application so Visual Studio can attach to it.
IZ-DOC-X86-0058-R3 6 Setup
Host Setup
Start the Visual Studio session:
1. Open the solution in Visual Studio.
2. In the Debugmenu, click Attach to Process.
3. The Attach to Process dialog appears. Configure the Attach settings as follows:
l Transport – Set to Remote (Native only with no authentication)
l Qualifier – Enter the Server Name you copied during MSVSMON setup (Step 8a under StartMSVSMON above)
l Enable Show processes from all users
4. Click Refresh.
5. Under Available Processes, select the process to attach to.
IZ-DOC-X86-0058-R3 7 Setup
6. Click Attach.
Connection TroubleshootingIf there are any problems connecting the host and target systems, check to ensure:
l The Server Name in the Attach to Process window matches the Server Name in the MSVSMON optionson the target system
l The RTX subsystem has been started on the target system
NOTE: While remote debugging, if the connection is lost, Visual Studio may close and restart.
IZ-DOC-X86-0058-R3 8 Setup
DebuggingAfter you have configured the host and target systems and attached to the process, you can debug yourapplication as you normally would within Visual Studio.
IZ-DOC-X86-0058-R3 9 Debugging
ResourcesFor more information on RTX, visit the IntervalZero website at http://www.intervalzero.com/
For information on MSVSMON setup, see the MSDN article How to: Set Up Remote Debugging athttp://msdn.microsoft.com/en-us/library/bt727f1t.aspx
IZ-DOC-X86-0058-R3 10 Resources