Using the Debugger (Magic xpi 3.x)
The Magic xpi Debugger is a part of the Magic xpi Studio that lets you test your integration project during the development stage. The Debugger runs your project or attaches to a running project and gives you the ability to control the way the project is executed. You can control and view execution sequences, flow variables, Magic xpi services, and breakpoints. The Debugger's Context Tree gives you a full and complete picture of how the Server executes the flows in your project.
When starting the Debugger, the entire project is automatically rebuilt in Debug mode. Because this process can take a long time, it is recommended that you use the Flow Debug option if you only want to debug a specific flow. This option is accessed from the flow's context menu in the Navigation pane. Alternatively, you can set any flows that you do not want to debug as inactive.
Note:
|
When debugging a single flow (by right-clicking on the flow and selecting Debug), the first execution of the flow is carried out immediately as if the flow was set to Autostart. When the flow execution is completed once, any defined triggers will wait for external events. If this flow contains a trigger, the flow will be executed twice. The first execution is caused by Autostart without involving the trigger, and the second execution is due to the trigger itself.
|
When you execute the Debugger, the Checker checks all active flows. Flows with errors will be marked as Inactive and will not be able to run during the Debug session. A project ibp file is created by the Debugger. You cannot run this project in the Server, since the project ibp file was created by the Debugger. If you want to run this project in the Server, you will need to select the Re-Build All option.
When starting the Debugger, if the Checker finds errors, an error message will appear. You can click the View Errors button to open the Checker Results dialog box. If you click this button, the Debugger will not continue.
A debug session can be started in one of the following ways:
-
Open mode: Opening a project on a local machine. You do this by selecting Open from the Debugger menu or by clicking in the toolbar.
-
Attach to Server mode: Attaching to a running server on a local or remote machine. This option lets the Studio debug running projects. You do this by selecting Attach to Server from the Debugger menu.
The Debugger may be controlled either by using the Debugger menu (Run, Stop, Break, Step, Continue/Run, Restart) or by predefined settings (suspended flows, set next step, breakpoints, steps, branches). These commands will cause the server to be either in Stopped or Running modes. This will be indicated at the top of the Magic xpi Studio, as shown in the following image. Stopped mode means that the Server will not execute and waits for a command. All running contexts will not execute the next step until the Server is in Running mode.
In the project's folder there is a file called Debug_Info. This file holds the connection details to the broker and database. If you upgraded your project or changed machines, delete this file and start the Debugger again. A new Debug_Info file will be created with the current installation's details.
In cases like this you need to have two Magic xpi installations (either two Suites or Server and Suite installations). You also cannot use the same internal database for both installations, since both environments (development and production) will write to the same place and you will not know which messages are relevant to which environment.
Notes:
|
-
The flow's Timeout property is not executed in Debug mode. This is relevant only when the Debugger starts the project execution. If the Debugger attaches to a running project, the Timeout property behaves as defined in the flow properties.
-
A temporary .ini file called DebugSRV.ini is created under the project directory when you start the Debugger. It is deleted when the Debugger is stopped.
|
The Debugger Menu
Navigation Pane
Context Tree
Debugger Settings
Attach to Server
Debugger Flow View
Setting a Breakpoint
Suspending a Flow, Branch, or Step
Breakpoints and Suspended List
Exiting the Debugger
Activity Log
Context View
Debugging a Project