DVT Debugger Integration - Part I - Connect the DVT IDE to the Simulator

Description

The DVT Debugger Add-On Module, an extension of the DVT Eclipse IDE, allows you to debug your code from within the DVT IDE: add breakpoints, control the simulation (stop, resume, step), inspect variables, and so on.

To control the simulation from within DVT, a communication channel must be established with the simulator. The first part of this demo movie series shows how to connect DVT to a simulation launched either from DVT (using a DVT Generic Run Configuration) or from outside DVT (from example in a terminal). In both situations, one has to pass the simulator a set of specific command line switches, documented in the DVT Debugger Integration Simulation Prerequisites documentation page: http://dvteclipse.com/documentation/sv/Simulation_Prerequisites.html.

The second part of this demo movie series illustrates the flow of a typical debug session: first add some breakpoints and resume the simulation until it hits the first breakpoint. Then step through some code, navigate the call stack, inspect and watch variables. It's even possible to change a variable value: it's just a click away!

For further information about the DVT Debugger, please visit: http://www.dvteclipse.com/DVT_Debugger_Add-On_Module.html

Transcript

Introduction

The DVT Debugger Integration allows you to debug your code from within the IDE, add breakpoints, control the simulation, inspect variables, and so on.

Configuring the Debug Session

Let's assume you already have a DVT Generic Run configuration set up for launching simulations. Go to the Run > Debug Configurations menu and select the configuration you wish to debug. First, make sure you check both Run and Debug as supported launch modes. Then, you just have to edit the simulator launch command and pass it a few extra command line switches.

The DVT documentation lists the switches required for debugging for each major simulator. See the documentation for the required switches. Hit the Debug button to start debugging. DVT waits for the simulation to start, prompts for some connection details, and then connects to the simulation. You are now ready to debug.

After the initial setup of the debug configuration, you can launch again in debug mode with just a click on the toolbar button.

Connecting to a Running Simulation

You can also start the simulation from any terminal and on any machine, as long as there is network connectivity between the simulation machine and the DVT machine. Just remember to add the extra command line switches. After your code is loaded, and just before the simulation starts, the connection parameters will be printed in the simulator console. In DVT, create a new DVT debug configuration and fill in the connection parameters, then hit the Debug button. You are now ready to debug.