Debugging as a stand-alone Java application

About this task

To debug as a stand-alone application, you need to write a main operation that simulates a IBM® Rational® Rhapsody® callback as in the following 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.


Feedback