Integrated Virtual Debugger for Eclipse Developer’s Guide VMware Workstation 8.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.
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: docfeedback@vmware.com Copyright © 1998-2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws.
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 Debugg
Integrated Virtual Debugger for Eclipse Developer’s Guide 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.
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.
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).
Chapter 1 Using the Integrated Virtual Debugger for Eclipse Supported JRE Versions The host system must be running a Java runtime environment (JRE) meeting Java 2 Platform Standard Edition (J2SE) 5.0 or higher specifications. J2SE consists of the JRE and developer tools for compiling, debugging, and running applications written in the Java language. NOTE Eclipse displays the error message unable to load class if an unsupported version of J2SE is being used on the host system.
Integrated Virtual Debugger for Eclipse Developer’s Guide 10 VMware, Inc.
2 Remote Debugging in Java Environment 2 You can use remote debugging to debug a Java application from inside a virtual machine that has a different guest operating system from the host.
Integrated Virtual Debugger for Eclipse Developer’s Guide Table 2-1. Windows and Linux Guest Operating Systems (Continued) Processor Type Operating System Edition Windows 64‐bit Windows 7 Ultimate Edition Windows 7 Enterprise Edition Windows 7 Professional Windows 7 Home Premium Windows 7 Home Basic Windows Vista x64 Edition (Aero and 3‐D effects not yet supported) Windows Server 2003 x64 Edition Windows XP Professional x64 Linux 32 and 64‐bit Red Hat Linux 9 Red Hat Enterprise Linux 5.
Chapter 2 Remote Debugging in Java Environment 3 Click OK. 4 (Optional) On Windows Vista guests, you might have to restart the firewall after configuring it to allow incoming connections to the JVM. Managing Virtual Machine Launch Configurations You can manage configuration settings for each virtual machine in which you want to debug applications. Integrated Virtual Debugger launch configurations determine which virtual machine to run the application in and how the application is executed.
Integrated Virtual Debugger for Eclipse Developer’s Guide 9 (Optional) Indicate actions to be performed after the application has terminated: Select Run script and enter one or more shell commands to be executed in the guest operating system after the application has terminated. No syntax checking is performed. Either enter one command per line, or enter multiple commands on the same line using a semicolon as a separator. Select one of the Set virtual machine state options. 10 Click Apply.
Chapter 2 Remote Debugging in Java Environment Start an Application Debugging Session in a Virtual Machine Do not suspend a virtual machine while the Integrated Virtual Debugger is connected to an application. If you do, the Integrated Virtual Debugger disconnects from the application. To start an application debugging session in a virtual machine 1 2 Begin the session in one of the following ways: From the Debug menu, choose the configuration for the application to start debugging.
Integrated Virtual Debugger for Eclipse Developer’s Guide 16 VMware, Inc.
3 Remote Debugging in the C and C++ Environment 3 You can use remote debugging to debug C and C++ applications from inside a virtual machine. You can set a remote debugging session inside a controlled C and C++ environment where the guest operating system is different from the host.
Integrated Virtual Debugger for Eclipse Developer’s Guide Table 3-1. Windows and Linux Guest Operating Systems (Continued) Processor Type Operating System Edition Windows 64‐bit Windows 7 x64 Edition Windows Vista x64 Edition Windows Server 2008 Windows Server 2003 x64 Edition Windows XP Professional x64 Linux 32 and 64‐bit Red Hat Linux 8 and 9 Red Hat Enterprise Linux 5.x Red Hat Enterprise Linux 4.x Red Hat Enterprise Linux Advanced Server Enterprise Server Workstation 4 and 5 Ubuntu Linux 8.04, 8.
Chapter 3 Remote Debugging in the C and C++ Environment Install C and C++ Development Toolkit and Remote System Explorer Plug-ins The Eclipse Classic 3.4.x requires the C and C++ development toolkit (CDT) and remote system explorer (RSE) plug‐ins to debug C and C++ applications. To install C and C++ development tooling and remote system explorer plug-in 1 Select Help > Software Updates. 2 Click on the Available Software tab.
Integrated Virtual Debugger for Eclipse Developer’s Guide Managing Virtual Machine Launch Configurations You can manage the Debug configuration settings to determine which virtual machine runs the application and how the application is run. The configuration also allows you to run command‐line scripts before and after the debugging session and enable specified shared folders during the debugging session.
Chapter 3 Remote Debugging in the C and C++ Environment Running and Debugging Applications in Virtual Machines You can use the Integrated Virtual Debugger to: Start an application debugging session in a virtual machine. Start an application in a virtual machine without debugging. Start an Application Debugging Session in a Virtual Machine Do not suspend a virtual machine while the Integrated Virtual Debugger is connected to an application.
Integrated Virtual Debugger for Eclipse Developer’s Guide Solutions The following actions provide solutions for each of the causes: Turn off the firewall in the guest. Make sure that networking is enabled and functional in the guest. Power on the virtual machine and start a debugging session. Run the following command: ./eclipse -vmargs -Dorg.eclipse.swt.internal.gtk.
Chapter 3 Remote Debugging in the C and C++ Environment Solutions To work around this issue, do one of the following tasks: Log in using the guest operating system login screen before you continue the debugging session. You must use an account that is password protected. VMware, Inc.
Integrated Virtual Debugger for Eclipse Developer’s Guide 24 VMware, Inc.
Index A J attaching to a process for debugging 15 JVM (Java virtual machine) 13 L C change JVM path 13 configurations, launch, for debugging in Eclipse deleting 14, 20 duplicating 13, 14 editing 14 overview of 13 to attach to applications 14 to start a virtual machine 13 launch configurations for debugging in Eclipse deleting 14, 20 duplicating 13, 14 editing 14 to attach to applications 14 to start applications 13 P plug-ins Eclipse Integrated Virtual Debugger 7 D S debug configuration settings 2
Integrated Virtual Debugger for Eclipse Developer’s Guide 26 VMware, Inc.