Windows Debugger (CDB)

The Debugging Tools for Windows package from Microsoft includes a source-level console debugger called CDB. Unlike MSVC, CDB can be used from the GUI in conjunction with the OPNET Debugger. Because CDB offers a way to control and examine the execution of source code, it is a useful supplement to ODB. With CDB attached, you can perform detailed debugging of process model code in the context of an active simulation.

Setting Up CDB

CDB is part of the Debugging Tools for Windows package, which is a free download from Microsoft. Before using CDB with Riverbed Modeler, follow Procedure 7.

Procedure 7: Preparing to Use CDB with a Simulation

  1. Make sure CDB is installed on the computer that will run the simulation.

    If necessary, download and install Debugging Tools for Windows from the Microsoft web site. To find the download, go to www.microsoft.com and search for “debugging tools”. Pick either the 32-bit or 64-bit version, depending on your computer.

  2. Make sure the preference giving the path to the installed version of Debugging Tools for Windows is set correctly:

  3. Make sure the "console" preference is set to TRUE.

Attaching CDB to a Simulation

Before attaching CDB to a simulation, make sure CDB is installed on the computer that will run the simulation.

Procedure 8: Attaching CDB to a Simulation from the GUI

  1. Run the development simulation kernel with ODB enabled.

  2. From the menu bar in the Simulation Execution dialog box, choose Simulation > Attach Windows Debugger (CDB).

    Result: CDB is attached to the simulation and the Simulation Console expands to support CDB operation (see Simulation Console (ODB and Source-Level Debugger)).

    Note: The menu item changes from Attach Windows Debugger (CDB) to Detach Windows Debugger (CDB); use this operation if you need to detach CDB.

Using CDB

When using CDB with ODB, observe the following guidelines.

  • To view your model source code in CDB, compile custom model code with the /Zi /Od options in the "comp_flags_devel" preference.

    Note— /Zi produces a program database (.pdb file) that contains type information and symbolic debugging information used by the debugger.

  • Avoid using ODB commands within events (for example, at a CDB breakpoint). Although this will generally work, the simulation could crash if incomplete actions exist.

For general information on using CDB, refer to the “Debugging Tools for Windows” documentation.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com