Commit 6e68e25
committed
Debug infrastructure: managed mode, hit-count dedup, and comprehensive tests
- Enable managed execution mode in CommandHelperPlugin so the debug
session survives script completion on embedded (Minecraft) servers
- Fix hit-count breakpoint deduplication: multiple AST nodes on the same
source line no longer increment the hit counter more than once per
visit. Uses column-based caching in ThreadDebugState to distinguish
"same line, different node" from "new loop iteration, same first node"
- Add evaluateBreakpointCondition() to DebugContext with per-thread
cache-aware hit-count and condition evaluation
- Add Breakpoint.getHitCount() getter
- Add MSDebugServer managed mode support: setManagedExecution(),
startedOnHostMainThread capture, resumeOnHostMainThread() for
resuming on the server main thread, dynamic scripting mode flag
in evaluate handler
- Add 21 new DAP integration tests (39 total) covering: managed mode
step-over, thread events, disconnect; variables/scopes; CArray
expansion (indexed, associative, nested); evaluate expressions;
exception breakpoints; conditional and hit-count breakpoints;
step-in, step-out, step-in targets; disconnect resumes execution1 parent fb7d440 commit 6e68e25
File tree
6 files changed
+726
-19
lines changed- src
- main/java/com/laytonsmith
- commandhelper
- core/environments
- tools/debugger
- test/java/com/laytonsmith/core
6 files changed
+726
-19
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
162 | 169 | | |
163 | 170 | | |
164 | 171 | | |
| |||
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
489 | 494 | | |
490 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
491 | 503 | | |
492 | 504 | | |
493 | 505 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
| |||
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
98 | 149 | | |
Lines changed: 44 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
145 | 158 | | |
146 | 159 | | |
147 | 160 | | |
| |||
162 | 175 | | |
163 | 176 | | |
164 | 177 | | |
165 | | - | |
166 | 178 | | |
167 | 179 | | |
168 | 180 | | |
| |||
328 | 340 | | |
329 | 341 | | |
330 | 342 | | |
| 343 | + | |
331 | 344 | | |
332 | 345 | | |
333 | 346 | | |
| |||
940 | 953 | | |
941 | 954 | | |
942 | 955 | | |
| 956 | + | |
| 957 | + | |
943 | 958 | | |
944 | 959 | | |
945 | 960 | | |
| |||
952 | 967 | | |
953 | 968 | | |
954 | 969 | | |
| 970 | + | |
955 | 971 | | |
956 | 972 | | |
957 | 973 | | |
| |||
994 | 1010 | | |
995 | 1011 | | |
996 | 1012 | | |
997 | | - | |
| 1013 | + | |
998 | 1014 | | |
999 | 1015 | | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1000 | 1021 | | |
1001 | 1022 | | |
1002 | 1023 | | |
1003 | 1024 | | |
1004 | 1025 | | |
1005 | 1026 | | |
1006 | 1027 | | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1007 | 1049 | | |
1008 | 1050 | | |
1009 | 1051 | | |
| |||
0 commit comments