Integrated Virtual Debugger for Eclipse Developer's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Integrated Virtual Debugger for Eclipse Developer’s Guide VMware Workstation 7.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000172-00 Integrated Virtual Debugger for Eclipse Developer’s Guide You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: [email protected] Copyright © 1998-2009 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com 2 VMware, Inc. Contents About This Book 5 1 Using the Integrated Virtual Debugger for Eclipse 7 Debugging Environment of the Integrated Virtual Debugger 7 Installation Requirements of the Integrated Virtual Debugger for Eclipse 8 Host System Requirements 8 Supported Host Operating Systems 8 Supported JRE Versions 9 Eclipse Requirements 9 Installing and Uninstalling the Integrated Virtual Debugger for Eclipse 9 VMware Tools Requirements 9 2 Remote Debugging in Java Environment 11 Virtual Machine Requirements for Debugging Java Applications 11 Supported Guest Operating Systems 11 Update the Eclipse Build Settings to Use a 1.4.x JRE 12 Installing PSAPI.DLL on Windows NT 12 Disabling the Firewall on Linux Guest Systems 12 Configure the Firewall on Windows Guest Systems 12 Managing Virtual Machine Launch Configurations 13 Use Application Configurations to Start Applications in a Virtual Machine 13 Use Configurations to Attach to Applications Running in a Virtual Machine 14 Delete a Configuration 14 Running and Debugging Applications in Virtual Machines 14 Start an Application Debugging Session in a Virtual Machine 15 Start an Application in a Virtual Machine Without Debugging 15 Attach to an Application Running in a Virtual Machine 15 3 Remote Debugging in the C and C++ Environment 17 Virtual Machine Requirements for C and C++ Applications 17 Supported Guest Operating Systems 17 Install Eclipse Classic 3.4.x on the Host 18 Use Proxy for Network Connection 18 Install C and C++ Development Toolkit and Remote System Explorer Plug‐ins 19 Install the Eclipse Plug‐in Manually 19 Disabling the Firewall on Guest Systems 19 Managing Virtual Machine Launch Configurations 20 Set Debug Configuration Settings to Start Applications in a Virtual Machine 20 Delete a Configuration 20 Running and Debugging Applications in Virtual Machines 21 Start an Application Debugging Session in a Virtual Machine 21 Start an Application in a Virtual Machine Without Debugging 21 VMware, Inc. 3 Integrated Virtual Debugger for Eclipse Developer’s Guide Troubleshooting the C and C++ Environment 21 Debugging Session Fails to Start 21 Debugging Session Fails to Start and Protocol Error Appears 22 Eclipse Fails When You Start a Debugging Session 22 Reverting to the Recent Snapshot Stops Responding 22 Log in Authentication Error on the Guest 22 Index 25 4 VMware, Inc. About This Book The Integrated Virtual Debugger for Eclipse Developer’s Guide provides information on how to install the Integrated Virtual Debugger for Eclipse. The guide also provides information on how to manage launch configurations to debug Java or C and C++ applications in multiple virtual machines simultaneously or multiple sessions in a single virtual machine. Intended Audience This book is intended for anyone who wants to debug in a virtual machine. The information in this book is written for experienced Windows or Linux developers and QA Engineers who are familiar with virtual machine technology and the debugging process. Document Feedback VMware welcomes your suggestions for improving our documentation. If you have comments, send your feedback to [email protected]. Technical Support and Education Resources The following sections describe the technical support resources available to you. To access the current version of this book and other books, go to http://www.vmware.com/support/pubs. Online and Telephone Support To use online support to submit technical support requests, view your product and contract information, and register your products, go to http://www.vmware.com/support. Customers with appropriate support contracts should use telephone support for the fastest response on priority 1 issues. Go to http://www.vmware.com/support/phone_support.html. Support Offerings To find out how VMware support offerings can help meet your business needs, go to http://www.vmware.com/support/services. VMware Professional Services VMware Education Services courses offer extensive hands‐on labs, case study examples, and course materials designed to be used as on‐the‐job reference tools. Courses are available onsite, in the classroom, and live online. For onsite pilot programs and implementation best practices, VMware Consulting Services provides offerings to help you assess, plan, build, and manage your virtual environment. To access information about education classes, certification programs, and consulting services, go to http://www.vmware.com/services. VMware, Inc. 5 Integrated Virtual Debugger for Eclipse Developer’s Guide 6 VMware, Inc. 1 Using the Integrated Virtual Debugger for Eclipse 1 The Integrated Virtual Debugger for Eclipse provides a configurable interface between Eclipse and virtual machines making it easy to develop and debug, on a single PC, applications that run on multiple operating systems. Debugging your applications in virtual machines enables you to reproduce and record errors while maintaining the integrity of the host machine. This chapter contains the following sections: “Debugging Environment of the Integrated Virtual Debugger” on page 7 “Installation Requirements of the Integrated Virtual Debugger for Eclipse” on page 8 “Installing and Uninstalling the Integrated Virtual Debugger for Eclipse” on page 9 Debugging Environment of the Integrated Virtual Debugger The Integrated Virtual Debugger lets you debug Java or C++ applications in a virtual machine. It is often necessary to debug an application in many different environments. With the Integrated Virtual Debugger you can debug a Java or C++ application on different operating systems and different JVMs. For example, you can also debug using different versions of Windows, service packs, DLLs installed, and so on. Using virtual machines for debugging provides a convenient alternative to debugging on physical machines because you can debug an application on different setups. The Integrated Virtual Debugger helps manage your virtual machines. The Integrated Virtual Debugger can power guest virtual machines on and off, start the application in its virtual machine, attach the debugger to the application, and control the application. The typical debugging tasks such as pausing at breakpoints, stepping through code, and viewing and modifying the state of your application, can be performed without impacting the host environment. The Integrated Virtual Debugger also enables you to: Manage launch configuration settings for application execution and debugging in virtual machines. Start an application debugging session in a virtual machine. Start an application in a virtual machine without debugging. Start a debugging session that attaches to a process already running in a virtual machine. Using Eclipse launch configurations, you can choose a virtual machine in which to run your application and determine how the application is executed. When configured, the Integrated Virtual Debugger finds the virtual machine, powers it on if necessary, sets up the environment based on your configuration settings, and starts or attaches to the application. To configure how an application is started in a virtual machine, you can specify: Name of the virtual machine (.vmx configuration file). Account credentials for guest console. (Optional) Path to the Java Virtual Machine (JVM) on the guest system. (Optional) Locations of folders to be shared between the host and the guest. VMware, Inc. 7 Integrated Virtual Debugger for Eclipse Developer’s Guide (Optional) Actions to take before launching an application from Eclipse, including: Revert to the most recent snapshot. Run specified pre‐execution commands. (Optional) Actions to take after an application launched from Eclipse is terminated, including: Run specified post‐execution commands (for example, to perform cleanup tasks). Set the virtual machine state to: Suspended (default) Revert to the most recent snapshot Powered off Installation Requirements of the Integrated Virtual Debugger for Eclipse The Integrated Virtual Debugger is supported for Workstation 7.0. Host System Requirements The Integrated Virtual Debugger for Eclipse can run on any supported host operating system that is running Workstation 7.0 and has Eclipse installed. Eclipse must be running on the same host system as Workstation 7.0. For information about Eclipse versions, see “Eclipse Requirements” on page 9. Supported Host Operating Systems The Integrated Virtual