Skip to content

Commit 3c541af

Browse files
committed
Document Data Editor debug launch options
1 parent 09d89ce commit 3c541af

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

doc/Wiki.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,15 @@ Once the `launch.json` file has been created it will look something like this
294294
"type": "file",
295295
"path": "${workspaceFolder}/infoset.xml"
296296
},
297-
"debugServer": 4711
297+
"debugServer": 4711,
298+
"openDataEditor": false,
299+
"dataEditor": {
300+
"port": 9000,
301+
"logging": {
302+
"file": "",
303+
"level": "info"
304+
}
305+
}
298306
}
299307
```
300308

@@ -314,10 +322,20 @@ This default configuration will prompt the user to select the DFDL Schema and da
314322
"type": "file",
315323
"path": "${workspaceFolder}/infoset.xml"
316324
},
317-
"debugServer": 4711
325+
"debugServer": 4711,
326+
"openDataEditor": true,
327+
"dataEditor": {
328+
"port": 9000,
329+
"logging": {
330+
"file": "",
331+
"level": "info"
332+
}
333+
}
318334
}
319335
```
320336

337+
Set `openDataEditor` to `true` to open the Data Editor when the debug session starts. The `dataEditor` settings configure the Ωedit server port and Data Editor logging. Leave `logging.file` empty to use the default OS app-data/XDG log location, or set it to a specific log file path. For the Ωedit server, `logging.level` accepts `trace`, `debug`, `info`, `warn`, `warning`, `error`, `fatal`, and `critical`. The launch config wizard also exposes these settings as **Open Data Editor**, **omega-edit Port**, **Log File**, and **Log Level**.
338+
321339
## Dropdown for Log Level
322340
A dropdown list has been added in the launch config wizard under Log Level settings. There are four different options to select including DEBUG, INFO, WARNING, ERROR, and CRITICAL.
323341

@@ -342,6 +360,8 @@ In the launch.json file, there's a new suggestion mode that gives you suggestion
342360

343361
Using the launch profile above a `DFDL parse: My Data` menu item at the top of the `Run and Debug` pane (Command-Shift-D) will display. Then press the `play` button to start the debugging session.
344362

363+
If `openDataEditor` is enabled, the Data Editor opens the configured input data file at the start of the debug session. For a DFDL debug session, that file comes from the debug launch target, so the Data Editor does not prompt for a separate file selection.
364+
345365
In the Terminal, log output from the DFDL debugger backend service will display. If something is not working as expected, check the output in this Terminal window for hints.
346366

347367
The DFDL Schema file will also be loaded in VS Code and there should be a visible marking at the beginning where the debugger has paused upon entry to the debugging session. Control the debugger using the available VS Code debugger controls such as `setting breakpoints`, `removing breakpoints`, `continue`, `step over`, `step into`, and `step out`.
@@ -372,6 +392,8 @@ From left to right, the icons indicate the following functions: Continue, Step O
372392
* The Restart button will stop the current execution and begin again from the beginning.
373393
* The Stop button will immediately terminate and abort all processing.
374394

395+
When the Data Editor is open during a debug session, it tracks the parser location in the input data. As the debugger pauses on entry, steps through the schema, or stops at breakpoints, the Data Editor highlights the corresponding byte position so the schema, infoset, and input data can be compared together.
396+
375397
<details>
376398
<summary>Debug Control Examples</summary>
377399
If you were parsing a JPEG file and reached the APP0 Marker, your temporary infoset file would look like this:

0 commit comments

Comments
 (0)