Chapter 6. Launching and Debugging

Table of Contents

Introduction
Launch Configurations
Running a Simulation
Quick Run
The Run Configurations Dialog
Creating a Launch Configuration
Debug vs. Release Launch
Batch Execution
Debugging a Simulation
Starting a Debug Session
Using the Debugger
Pretty Printers
Just-in-Time Debugging
Profiling a Simulation on Linux
Controlling the Execution and Progress Reporting

Introduction

The OMNeT⁠+⁠+ IDE lets you execute single simulations and simulation batches, and also to debug and, to some extent, profile simulations. You can choose whether you want the simulation to run in graphical mode (using Qtenv) or in console (using Cmdenv); which simulation configuration and run number to execute; whether to record an eventlog or not; and many other options.

When running simulation batches, you can specify the number of processes allowed to run in parallel, so you can take advantage of multiple processors or processor cores. The progress of the batch can be monitored, and you can also kill processes from the batch if needed. Batches are based on the parameter study feature of INI files; you can read more about it in the OMNeT⁠+⁠+ Simulation Manual.

Debugging support comes from the Eclipse C/C⁠+⁠+ Development Toolkit (CDT), and beyond the basics (single-stepping, stack trace, breakpoints, watches, etc.) it also offers you several conveniences and advanced functionality such as inspection tooltips, conditional breakpoints and so on. Debugging with CDT also has extensive literature on the Internet. Currently CDT uses the GNU Debugger (gdb) as the underlying debugger.

Profiling support is based on the valgrind program, http://valgrind.org. Valgrind is a suite of tools for debugging and profiling on Linux. It can automatically detect various memory access and memory management bugs, and perform detailed profiling of your program. Valgrind support is brought into the OMNeT⁠+⁠+ IDE by the Linux Tools Project of Eclipse.