You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. *Call Stack* panel: Identifies the functions or procedures that are currently in the stack.
51
-
. *Breakpoints* panel: Lists all breakpoints in your Mule application.
52
+
. *Breakpoints* panel: Lists breakpoints by file and line, and includes <<exception-breakpoints,*All Exceptions*>> to stop when any exception is thrown.
52
53
. *Terminal* console: Displays the output of the Maven build process and the results of the deployment to the embedded Mule Runtime engine.
53
54
. *Breakpoint* icon: Identifies a line in the configuration XML to pause execution of the flow so that you can check for and fix any issues.
54
55
. *Breakpoint* icon: Identifies a component that contains one or more breakpoints.
55
56
57
+
Open the *Debug Console* tab in the panel area to <<evaluate-dw-debug-console,evaluate DataWeave>> while execution is paused. See <<evaluate-dw-while-debugging>>.
58
+
56
59
57
60
[[add-breakpoint]]
58
61
== Add a Breakpoint
@@ -116,7 +119,33 @@ A breakpoint icon appears on the component and in the configuration XML for that
116
119
+
117
120
When execution reaches the breakpoint, processing pauses so you can inspect variables, payloads, and the execution state in the Debug panel.
118
121
119
-
NOTE: Batch execution is concurrent. Multiple record blocks can be processed in parallel, so breakpoints can trigger on different threads. The Debug panel displays each thread context separately so you can inspect each execution path.
122
+
NOTE: Batch execution is concurrent. Multiple record blocks can be processed in parallel, so breakpoints can trigger on different threads. The Debug panel displays each thread context so you can inspect each execution path.
123
+
124
+
[[conditional-breakpoint]]
125
+
== Set a Conditional Breakpoint
126
+
127
+
A conditional breakpoint uses a DataWeave expression, so execution pauses at that line only when the expression evaluates to `true`.
128
+
129
+
To set or change a breakpoint condition:
130
+
131
+
. Add a breakpoint in the configuration XML. See <<add-breakpoint>>.
132
+
. Right-click the breakpoint indicator in the gutter for that line.
133
+
. Select *Edit Breakpoint*.
134
+
. In the breakpoint editor, enter a DataWeave expression that uses the current Mule event.
135
+
136
+
The gutter context menu for a breakpoint also includes *Remove Breakpoint*, *Disable Breakpoint*, and *Run to Line*.
137
+
138
+
To review a condition later, hover over the breakpoint in the gutter. A tooltip shows the configured expression in the form `Condition:` followed by your DataWeave expression.
139
+
140
+
[[exception-breakpoints]]
141
+
== Stop When an Exception Is Thrown
142
+
143
+
You can configure the debugger to pause whenever any exception is thrown, which helps you inspect failures without adding breakpoints to every path.
144
+
145
+
. Open *Run and Debug*.
146
+
. In the *BREAKPOINTS* section, enable *All Exceptions*.
147
+
+
148
+
If you enable *All Exceptions*, the debugger pauses as soon as an exception is thrown during a debug session.
120
149
121
150
[[run-debug-mode]]
122
151
== Run Your Application in Debug Mode
@@ -211,6 +240,34 @@ Stop and restart the application without packaging new dependencies, such as new
211
240
+
212
241
Stop execution of the application. The next debugging session that you start packages the application with any new dependencies.
213
242
243
+
[[evaluate-dw-while-debugging]]
244
+
== Evaluate DataWeave While Debugging
245
+
246
+
While execution is paused, you can run DataWeave against the current Mule event from the *Debug Console* or from pinned entries in the *Watch* panel. For the variables available in those expressions, see xref:dataweave::dataweave-variables-context.adoc[Predefined Mule event variables].
247
+
248
+
[[evaluate-dw-debug-console]]
249
+
=== Use the Debug Console
250
+
251
+
. Start a debug session and pause execution at a breakpoint or after a step. See <<run-debug-mode>> and <<debug-toolbar>>.
252
+
. Open the *Debug Console* tab, or choose *View* > *Debug Console*.
253
+
. Ensure the input is set to *Expression*. Type a DataWeave expression and press Enter to evaluate it against the current message, attributes, variables, and other values visible to the debugger at the pause.
254
+
+
255
+
The console shows each expression you run and its evaluated result for the current pause.
256
+
257
+
The *Debug Console* is suited to check if needed as you step through a flow.
258
+
259
+
[[evaluate-dw-watch]]
260
+
=== Use the Watch Panel
261
+
262
+
. Open the *Watch* panel in the *Run and Debug* sidebar.
263
+
. Add an entry with *+* and enter a DataWeave expression.
264
+
+
265
+
Whenever execution pauses, the debugger reevaluates each watch expression and shows the result next to the expression, similar to the *Debug Console*.
266
+
+
267
+
Watch expressions typically persist for later debug sessions in the same workspace, so you can keep inspecting the same values across runs.
268
+
269
+
The *Watch* panel is suited to values you want to track on every pause without retyping them.
270
+
214
271
[[hot-deploy]]
215
272
== Perform a Hot Deploy When Debugging
216
273
@@ -232,3 +289,8 @@ image::deb-hot-deploy.png["Hot-deploy (lightning) icon in a running Mule applica
232
289
To stop your debug session, in the *Run and Debug* panel, click the image:icon-stop.png["",15,15] (*Stop*) icon.
233
290
234
291
The status bar no longer indicates that the application is running.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/int-test-munit.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -451,7 +451,7 @@ Run your test in debug mode after adding breakpoints to the XML for your tests o
451
451
. {open-project}
452
452
. Add breakpoints to the XML for the Mule application or test suites.
453
453
+
454
-
For guidance with breakpoints and the Mule event, see xref:int-debug-mule-apps.adoc[].
454
+
For guidance with breakpoints, the Mule event, DataWeave in the *Watch* panel and *Debug Console*, conditional breakpoints, and exception breakpoints, see xref:int-debug-mule-apps.adoc[].
455
455
. Run your test with a debugging command using one of the following options:
456
456
457
457
* From the *Testing* panel, click image:anypoint-code-builder::icon-munit-run-debug.png["",18,18] (*Debug test*) at any level (all tests, all tests in a suite, or a single test).
0 commit comments