Commit f3138c9
committed
DAP debug server, multi-thread debugging, and iterative interpreter debug support
- Add MSDebugServer implementing the Debug Adapter Protocol over TCP,
with launch/attach modes, breakpoints, step-over/step-in/step-out,
variable inspection, exception breakpoints, and watch expressions
- Add multi-thread DAP support: register/unregister threads, per-thread
pause states, sync and async stepping modes (sync blocks in place,
async snapshots state and resumes on a new thread)
- Refactor DebugContext into a full thread-aware debug state manager with
per-thread StepMode, ThreadDebugState, and a thread registry for DAP
- Add DaemonManager lifecycle listeners and thread-aware waitForThreads,
so the debug session stays alive while background threads run
- Extract spawnExecutionThread() to centralize execution thread lifecycle
(run, await daemons, signal completion) in one place
- Fix StackTraceManager thread affinity: remove isDebugAdopted flag so
background threads (x_new_thread) get their own STM instead of sharing
the main thread's, which was corrupting call depth for step-over
- Fix skippingResume flag: clear unconditionally on source line change
rather than requiring shouldStop=true, which blocked step-over returns
- Add StackTraceFrame.getTarget() for debugger source mapping
- Add Breakpoint condition/hitCount/logMessage support
- Wire up cmdline interpreter (--debug flag) and lang server for DAP
- Add DAPTestHarness and dual sync/async integration tests for step-over
and multi-thread step-over scenarios
- Add debugger dependency (lsp4j.debug) to pom.xml1 parent d0f6e51 commit f3138c9
26 files changed
Lines changed: 2741 additions & 293 deletions
File tree
- src
- main/java/com/laytonsmith
- PureUtilities
- core
- constructs
- environments
- exceptions
- functions
- natives/interfaces
- tools
- debugger
- langserv
- test/java/com/laytonsmith/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
379 | 384 | | |
380 | 385 | | |
381 | 386 | | |
| |||
569 | 574 | | |
570 | 575 | | |
571 | 576 | | |
| 577 | + | |
| 578 | + | |
572 | 579 | | |
573 | 580 | | |
574 | 581 | | |
| |||
842 | 849 | | |
843 | 850 | | |
844 | 851 | | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
845 | 870 | | |
846 | 871 | | |
847 | 872 | | |
| |||
Lines changed: 70 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
13 | 35 | | |
14 | 36 | | |
| 37 | + | |
15 | 38 | | |
16 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
17 | 60 | | |
18 | 61 | | |
19 | 62 | | |
20 | 63 | | |
21 | 64 | | |
22 | 65 | | |
23 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
24 | 80 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 81 | + | |
| 82 | + | |
30 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
31 | 88 | | |
32 | 89 | | |
33 | 90 | | |
| |||
37 | 94 | | |
38 | 95 | | |
39 | 96 | | |
| 97 | + | |
| 98 | + | |
40 | 99 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 100 | + | |
| 101 | + | |
46 | 102 | | |
47 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
48 | 108 | | |
49 | 109 | | |
50 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
97 | 115 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
764 | 765 | | |
765 | 766 | | |
766 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
767 | 771 | | |
768 | 772 | | |
769 | 773 | | |
| |||
1072 | 1076 | | |
1073 | 1077 | | |
1074 | 1078 | | |
1075 | | - | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1076 | 1095 | | |
1077 | 1096 | | |
1078 | 1097 | | |
1079 | 1098 | | |
1080 | 1099 | | |
1081 | 1100 | | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1082 | 1108 | | |
1083 | 1109 | | |
1084 | 1110 | | |
1085 | 1111 | | |
1086 | 1112 | | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1090 | 1131 | | |
1091 | 1132 | | |
1092 | 1133 | | |
| |||
1218 | 1259 | | |
1219 | 1260 | | |
1220 | 1261 | | |
1221 | | - | |
| 1262 | + | |
1222 | 1263 | | |
1223 | 1264 | | |
1224 | 1265 | | |
1225 | 1266 | | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1226 | 1295 | | |
1227 | 1296 | | |
1228 | 1297 | | |
1229 | | - | |
| 1298 | + | |
| 1299 | + | |
1230 | 1300 | | |
1231 | 1301 | | |
1232 | 1302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| 292 | + | |
291 | 293 | | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
299 | | - | |
300 | | - | |
| 302 | + | |
| 303 | + | |
301 | 304 | | |
302 | 305 | | |
303 | | - | |
| 306 | + | |
304 | 307 | | |
305 | 308 | | |
306 | | - | |
| 309 | + | |
307 | 310 | | |
308 | 311 | | |
309 | | - | |
| 312 | + | |
310 | 313 | | |
311 | 314 | | |
312 | 315 | | |
| |||
330 | 333 | | |
331 | 334 | | |
332 | 335 | | |
333 | | - | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
| |||
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
347 | | - | |
| 350 | + | |
348 | 351 | | |
349 | 352 | | |
350 | 353 | | |
351 | | - | |
| 354 | + | |
352 | 355 | | |
353 | 356 | | |
354 | 357 | | |
| |||
471 | 474 | | |
472 | 475 | | |
473 | 476 | | |
474 | | - | |
| 477 | + | |
475 | 478 | | |
476 | 479 | | |
477 | 480 | | |
| |||
0 commit comments