IBM Support

How to debug IBM Rational Rhapsody project source code using Microsoft Visual Studio

Question & Answer


Question

How do you use Microsoft Visual Studio to debug IBM Rational Rhapsody project source code?

Cause

Rhapsody animation can help to visually debug your application execution, but you may also need to debug at a source code level.

Answer

Using the MSVC debugger with your IBM Rational Rhapsody Project executable

This will allow you to debug the code generated by the Rhapsody project. For most occasions this will be adequate for requirements.

  1. Start Rhapsody and open your project. This example will use the Dishwasher project
  2. Enable animation in your active configuration

  3. Select the MSVC compiler that you wish to use as a debugger. See property CPP_CG::MSVC::IDEVersion.


  4. Rebuild the framework using menu: Code > Build Framework [Optional]
  5. Build your project using menu: Code > Rebuild
  6. Run your Rhapsody project. A console window should appear along with the animation toolbar, call stack and event queue windows in the Rhapsody user interface. Execution should be suspended.

  7. Open Microsoft Visual Studio and create an empty C++ project

  8. In MSVC using the Debug menu, attach to the process of your running Rhapsody project's executable

  9. In MSVC, using File > Open > Files... open any relevant Rhapsody project source files. In this example we will open the configuration main file MainEXE.cpp and the Dishwasher class file Dishwasher.cpp

  10. Add breakpoints to the source code. Note if the breakpoints are hollow you have not rebuilt the OXF libraries for the correct MSVC compiler

  11. In Rhapsody, select the "GO" button on the animation toolbar


  12. Context should automatically switch back to MSVC. You can now step through the execution using the standard debugger toolbar

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21981401