Apama Documentation : Using Apama with Software AG Designer : Debugging JMon Applications : Example debug session : Example of debugging in Software AG Designer
Example of debugging in Software AG Designer
You want to connect to the remote correlator and debug the JMon application in Software AG Designer. To do this, you must open the JMon project (or the Apama project with Java support enabled) in Software AG Designer and create a debug launch configuration. This launch configuration connects to the remote Java application, which is the JVM in the running correlator.
For test purposes, suppose that you create a simple breakpoint in the match() method in Simple.java. This suspends execution when the correlator reaches a matching event listener.
Send the following events to the correlator to trigger the breakpoint:
Tick("ibm", 1.0)
Tick("ibm", 5.0)
Tick("ibm", 15.0)
Tick("msft", 15.0)
As you can see, the debugger stops execution at the specified code breakpoint after the listener finds the first Tick event with a price greater than 10.0, that is Tick("ibm", 15.0).
Suppose that you want to examine the heap context, that is, the values of the variables. You can observe this in the top left Debug panel of the Apama Runtime perspective. Select the Simple.match method stack frame from Thread[ApamaProcessing].
Note that the Variables view now shows the proper stack frame context with all relevant heap space variable values. The tick variable, defined in the code, is not yet visible. This is because execution was suspended before the current line was executed. To execute the current line, which extracts the matching Tick event and assigns it to the tick variable, click Step Over in the Debug panel toolbar. As you can see, the tick variable now appears in the Variables view. You can select it to inspect its value, which is, of course, Tick("ibm", 15.0).
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback