Skip to content

Commit befc384

Browse files
committed
docs: add breakpoint doc
Signed-off-by: azerr <[email protected]>
1 parent 940a3e2 commit befc384

File tree

7 files changed

+50
-3
lines changed

7 files changed

+50
-3
lines changed

docs/dap/UserGuide.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,64 @@ Here is an example with `JavaScript debugging`, which uses the [VSCode JS Debug
1818

1919
To configure debugging with DAP, you need to fill in:
2020

21-
- The `Server` tab to specify the DAP server:
21+
### Server tab
22+
23+
The `Server` tab to specify the DAP server:
2224

2325
![DAP Configuration Type/Server](./images/DAP_config_type_server.png)
2426

25-
- The `Mappings` tab to specify the files which can be debugged to allow adding/removing breakpoints:
27+
### Mappings tab
28+
29+
The `Mappings` tab to specify the files which can be debugged to allow adding/removing breakpoints:
2630

2731
![DAP Configuration Type/Mappings](./images/DAP_config_type_mappings.png)
2832

29-
- The `Configuration` tab to specify the working directory and the file you want to run/debug:
33+
### Configuration tab
34+
35+
The `Configuration` tab to specify the working directory and the file you want to run/debug:
3036

3137
![DAP Configuration Type/Configuration](./images/DAP_config_type_configuration.png)
3238

39+
## Breakpoints
40+
41+
### Adding breakpoint
42+
43+
When a file can be debugged using a DAP server specified in the [Mappings tab](#mappings-tab), a breakpoint can be added.
44+
45+
![DAP Breakpoint set](./images/DAP_breakpoint_set.png)
46+
47+
### Verify breakpoint
48+
49+
When the DAP server starts, breakpoints are sent to it, and it responds with the status of those breakpoints —
50+
whether they are validated or not.
51+
52+
For example, when the DAP server [VSCode JS Debug](./user-defined-dap/vscode-js-debug.md) starts, it invalidates all breakpoints.:
53+
54+
![DAP Breakpoint invalid](./images/DAP_breakpoint_invalid.png)
55+
56+
When the program starts, it checks and validates the breakpoints.
57+
58+
![DAP Breakpoint invalid](./images/DAP_breakpoint_checked.png)
59+
60+
### Conditional breakpoint
61+
62+
Conditional breakpoints are also supported. Here is an example of a conditional breakpoint written in JavaScript:
63+
64+
![DAP Conditional Breakpoint](./images/DAP_conditional_breakpoint.png)
65+
66+
### Exception breakpoint
67+
68+
Some DAP servers support exception breakpoints. If so, you must first run the configuration process,
69+
which starts the DAP server and retrieves the list of available exception breakpoints.
70+
This list is accessible through the `Exception Breakpoints` menu:
71+
72+
![DAP exception breakpoints](./images/DAP_exception_breakpoints.png)
73+
74+
The first time, the selected exception breakpoints
75+
are based on the default configuration provided by the DAP server.
76+
77+
You can then select or deselect the exception breakpoints you want to use.
78+
3379
## Inline value
3480

3581
The values of the variables are displayed inline, but this is not perfect because a DAP server generally cannot handle variable positions (only their values).
10.4 KB
Loading
10.8 KB
Loading
11.2 KB
Loading
38.3 KB
Loading
103 KB
Loading

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<li>Improved IntelliJ startup performance by launching the language server only for visible editors</li>
1212
<li>Performance improvements for diagnostics</li>
1313
<li>Hide Semantic Tokens Inspector from toolbar</li>
14+
<li>Support for conditional / exception DAP breakpoints</li>
1415
<li>Fixing bugs</li>
1516
</ul>
1617
Learn more in the <a href="https://github.com/redhat-developer/lsp4ij/milestone/14?closed=1">changelog</a>.

0 commit comments

Comments
 (0)