ibm Rational Rhapsody 7.5 — Debugging Rational Rhapsody plug-ins

Creating a Rational Rhapsody plug-in Debugging Rational Rhapsody plug-ins You can debug your plug-in: Љ as a stand-alone Java application Љ from within a Rational Rhapsody process Debugging as a stand-alone Java application To debug as a stand-alone application, you will need to write a main operation that simulates a Rational Rhapsody callback. Below is an example:

public static void main(String[] args) { //create an instance of my plug-in MyPlugin myPlugin = new MyPlugin (); //get Rhapsody application that is currently running IRPApplication app =RhapsodyAppServer.getActiveRhapsodyApplication(); //init the plug-in myPlugin.RhpPluginInit(app); //simulate a call to the plug-in } myPlugin.RhpPluginInvokeItem(); Once you have included such a main operation, you can run Rational Rhapsody and debug the plug-in as you would any other Java application. Debugging from within Rational Rhapsody To debug from within Rational Rhapsody: 1. Add the following debug options to the JVM section of the rhapsody.ini file:

[JVM] Options=ClassPath,LibPath,Debug1,Debug2,Debug3 Debug1=-Xnoagent Debug2=-Xdebug Debug3=-Xrunjdwp:transport=dt_socket,address=6743,server=y,suspend=y Rational Rhapsody 513