-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
687 lines (687 loc) · 25.9 KB
/
Copy pathpackage.json
File metadata and controls
687 lines (687 loc) · 25.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
{
"name": "dap",
"displayName": "KDAB DAP",
"description": "Debug C/C++ programs using GDB's or LLDB's built-in Debug Adapter Protocol support",
"version": "1.3.0",
"publisher": "KDAB",
"repository": {
"type": "git",
"url": "https://github.com/KDAB/vscode-dap.git"
},
"bugs": {
"url": "https://github.com/KDAB/vscode-dap/issues"
},
"homepage": "https://github.com/KDAB/vscode-dap#readme",
"engines": {
"vscode": "^1.90.0"
},
"license": "MIT",
"categories": [
"Debuggers"
],
"activationEvents": [
"onDebugResolve:kdap",
"onDebugResolve:kdap-lldb"
],
"main": "./out/extension.js",
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "tsc -p tsconfig.test.json && npm run lint",
"lint": "eslint src/ --max-warnings 0",
"test": "npm run test:unit && npm run test:integration",
"test:unit": "mocha --ui tdd \"out/test/unit/**/*.test.js\"",
"test:integration": "vscode-test",
"format:check": "prettier --check \"src/**/*.ts\"",
"format:fix": "prettier --write \"src/**/*.ts\""
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "^22.20.1",
"@types/vscode": "^1.90.0",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.0.0",
"eslint": "^10.9.1",
"mocha": "^11.8.0",
"prettier": "3.9.6",
"typescript": "^6.0.3",
"typescript-eslint": "^8.68.0"
},
"keywords": [
"KDAB",
"GDB",
"LLDB",
"DAP",
"debugger",
"C",
"C++"
],
"icon": "kdab.png",
"capabilities": {
"untrustedWorkspaces": {
"supported": false
},
"virtualWorkspaces": false
},
"contributes": {
"configuration": {
"type": "object",
"title": "KDAB DAP",
"properties": {
"kdap.gdb.path": {
"scope": "resource",
"type": "string",
"description": "The path to the gdb binary. Defaults to searching for 'gdb' in PATH."
},
"kdap.lldb.path": {
"scope": "resource",
"type": "string",
"description": "The path to the lldb-dap binary. Defaults to searching for 'lldb-dap', then 'lldb-dap-<version>', in PATH; on macOS, where Xcode keeps lldb-dap out of PATH, it then asks xcrun for it."
},
"kdap.logPath": {
"scope": "resource",
"type": "string",
"description": "Enable DAP logging. Logs are written to this filename. If empty, logging is disabled."
},
"kdap.gdb.logLevel": {
"scope": "resource",
"type": "integer",
"description": "Set gdb's DAP logging level. The default is 1, which logs the DAP protocol and unexpected exceptions. Level 2 also logs exceptions that are considered expected, such as a failure to parse an expression.",
"default": 1,
"minimum": 1,
"maximum": 2
},
"kdap.environment": {
"scope": "resource",
"type": "object",
"default": {},
"description": "Extra environment variables to set on the debugger process.",
"additionalProperties": {
"type": "string"
}
}
}
},
"commands": [
{
"command": "kdap.downloadQtPrettyPrinters",
"title": "Download Qt Pretty Printers",
"category": "KDAB DAP"
},
{
"command": "kdap.runWithArgs",
"title": "Run with Args",
"category": "KDAB DAP"
},
{
"command": "kdap.debugWithArgs",
"title": "Debug with Args",
"category": "KDAB DAP"
},
{
"command": "kdap.loadCoreFile",
"title": "Load Core File",
"category": "KDAB DAP"
}
],
"menus": {
"commandPalette": [
{
"command": "kdap.downloadQtPrettyPrinters",
"when": "isLinux"
},
{
"command": "kdap.runWithArgs",
"when": "isLinux || isMac"
},
{
"command": "kdap.debugWithArgs",
"when": "isLinux || isMac"
},
{
"command": "kdap.loadCoreFile",
"when": "isLinux || isMac"
}
]
},
"breakpoints": [
{
"language": "c"
},
{
"language": "cpp"
},
{
"language": "rust"
}
],
"debuggers": [
{
"type": "kdap",
"label": "GDB (DAP)",
"languages": [
"c",
"cpp"
],
"configurationAttributes": {
"launch": {
"required": [
"program"
],
"properties": {
"debuggerPath": {
"type": "string",
"markdownDescription": "The path to the gdb executable to use."
},
"sysroot": {
"type": "string",
"description": "Path to the system root gdb should use when looking for shared libraries and debug info, as if by 'set sysroot'. If empty or omitted, gdb's default sysroot handling applies."
},
"skipInitFiles": {
"type": "boolean",
"description": "Skip reading the debugger's own init files. For gdb, as if by passing '-nx'.",
"default": false
},
"sourceFileMap": {
"type": "object",
"description": "Maps source paths recorded in the debug info to their location on disk, as if by 'set substitute-path'. Each key is the path as recorded in the debug info and each value is where that path is found locally.",
"additionalProperties": {
"type": "string"
}
},
"qtPrettyPrinters": {
"type": "boolean",
"description": "Automatically load Qt pretty-printers for gdb. If they haven't been downloaded yet, starting a debug session offers to download them.",
"default": false
},
"program": {
"type": "string",
"description": "Path to the executable to debug. Corresponds to gdb's 'file' command."
},
"args": {
"type": "array",
"description": "Command-line arguments passed to the inferior, as if by 'set args'.",
"default": []
},
"cwd": {
"type": "string",
"markdownDescription": "The working directory for gdb and the launched program. If omitted, gdb inherits VS Code's working directory rather than the workspace folder, so set this explicitly (e.g. `${workspaceFolder}`)."
},
"env": {
"type": "object",
"description": "Environment variables for the inferior. Each key is a variable name and each value must be a string. Setting this replaces the inferior's entire environment rather than adding to it, so PATH, HOME and friends must be listed too. If omitted, the inferior inherits gdb's environment."
},
"stopAtBeginningOfMainSubprogram": {
"type": "boolean",
"description": "Set a temporary breakpoint at the program's main procedure, as if by the 'start' command.",
"default": false
},
"stopOnEntry": {
"type": "boolean",
"description": "Set a temporary breakpoint at the program's first instruction, as if by the 'starti' command.",
"default": false
}
}
},
"attach": {
"properties": {
"debuggerPath": {
"type": "string",
"markdownDescription": "The path to the gdb executable to use."
},
"sysroot": {
"type": "string",
"description": "Path to the system root gdb should use when looking for shared libraries and debug info, as if by 'set sysroot'. If empty or omitted, gdb's default sysroot handling applies."
},
"skipInitFiles": {
"type": "boolean",
"description": "Skip reading the debugger's own init files. For gdb, as if by passing '-nx'.",
"default": false
},
"sourceFileMap": {
"type": "object",
"description": "Maps source paths recorded in the debug info to their location on disk, as if by 'set substitute-path'. Each key is the path as recorded in the debug info and each value is where that path is found locally.",
"additionalProperties": {
"type": "string"
}
},
"qtPrettyPrinters": {
"type": "boolean",
"description": "Automatically load Qt pretty-printers for gdb. If they haven't been downloaded yet, starting a debug session offers to download them.",
"default": false
},
"pid": {
"type": [
"number",
"string"
],
"description": "The process ID to which gdb should attach."
},
"program": {
"type": "string",
"description": "Path to the executable being debugged. In some cases gdb can determine this automatically, but for many remote targets it must be supplied."
},
"target": {
"type": "string",
"description": "The target to which gdb should connect, passed to the 'target remote' command."
},
"coreFile": {
"type": "string",
"description": "Path to a core dump file to load instead of attaching to a live process."
}
}
}
},
"initialConfigurations": [
{
"type": "kdap",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/<your program>",
"args": [],
"cwd": "${workspaceFolder}",
"stopOnEntry": true
}
],
"configurationSnippets": [
{
"label": "GDB: Launch",
"description": "Launch a program under gdb",
"body": {
"type": "kdap",
"request": "launch",
"name": "${2:Launch}",
"program": "^\"\\${workspaceFolder}/${1:<your program>}\"",
"args": [],
"cwd": "^\"\\${workspaceFolder}\"",
"stopOnEntry": true
}
},
{
"label": "GDB: Attach",
"description": "Attach gdb to a running process",
"body": {
"type": "kdap",
"request": "attach",
"name": "${2:Attach}",
"program": "${1:<your program>}"
}
},
{
"label": "GDB: Load Core Dump",
"description": "Load a core dump in gdb",
"body": {
"type": "kdap",
"request": "attach",
"name": "${2:Core}",
"program": "${1:<your program>}",
"coreFile": "${1:<your program>}.core"
}
}
]
},
{
"type": "kdap-lldb",
"label": "LLDB (DAP)",
"languages": [
"c",
"cpp"
],
"configurationAttributes": {
"launch": {
"required": [
"program"
],
"properties": {
"debuggerPath": {
"type": "string",
"markdownDescription": "The path to the lldb-dap executable to use."
},
"sourceFileMap": {
"type": "object",
"description": "Maps source paths recorded in the debug info to their location on disk, as if by 'settings set target.source-map'. Each key is the path as recorded in the debug info and each value is where that path is found locally.",
"additionalProperties": {
"type": "string"
}
},
"qtPrettyPrinters": {
"type": "boolean",
"description": "Load the Qt pretty-printers bundled with this extension by importing them as an lldb Python module.",
"default": false
},
"program": {
"type": "string",
"description": "Path to the executable to debug."
},
"args": {
"type": "array",
"description": "Command-line arguments passed to the inferior.",
"default": []
},
"cwd": {
"type": "string",
"markdownDescription": "The working directory for lldb-dap and the launched program. If omitted, lldb-dap inherits VS Code's working directory rather than the workspace folder, so set this explicitly (e.g. `${workspaceFolder}`)."
},
"env": {
"type": "object",
"description": "Environment variables for the inferior. Each key is a variable name and each value must be a string. These are added to the environment the inferior inherits rather than replacing it.",
"additionalProperties": {
"type": "string"
}
},
"stopOnEntry": {
"type": "boolean",
"description": "Stop at the program's entry point.",
"default": false
},
"initCommands": {
"type": "array",
"description": "lldb commands run once the debugger has been created, before the target exists. The place for 'platform select', pretty printer scripts, and anything else that must precede the target.",
"items": {
"type": "string"
},
"default": []
},
"preRunCommands": {
"type": "array",
"description": "lldb commands run after the target is created but before the program is launched or attached to.",
"items": {
"type": "string"
},
"default": []
},
"postRunCommands": {
"type": "array",
"description": "lldb commands run once the program has been launched or attached to.",
"items": {
"type": "string"
},
"default": []
},
"stopCommands": {
"type": "array",
"description": "lldb commands run each time the program stops.",
"items": {
"type": "string"
},
"default": []
},
"exitCommands": {
"type": "array",
"description": "lldb commands run once the program has exited.",
"items": {
"type": "string"
},
"default": []
},
"terminateCommands": {
"type": "array",
"description": "lldb commands run when the debug session ends.",
"items": {
"type": "string"
},
"default": []
},
"platformName": {
"type": "string",
"description": "The lldb platform to select, as if by 'platform select'. Needed for remote targets."
},
"targetTriple": {
"type": "string",
"description": "The target triple to debug for, overriding the one recorded in the executable."
},
"debuggerRoot": {
"type": "string",
"description": "Directory lldb-dap chdirs to before doing anything else, so that relative paths in commands resolve predictably."
},
"enableAutoVariableSummaries": {
"type": "boolean",
"description": "Show auto-generated summaries for variables when no language-specific summary applies.",
"default": false
},
"enableSyntheticChildDebugging": {
"type": "boolean",
"description": "Alongside a synthetic child, also show the raw value it was synthesised from.",
"default": false
},
"displayExtendedBacktrace": {
"type": "boolean",
"description": "Include extended backtraces, where the platform provides them.",
"default": false
},
"customFrameFormat": {
"type": "string",
"description": "Format string for stack frame names, using lldb's frame-format syntax."
},
"customThreadFormat": {
"type": "string",
"description": "Format string for thread names, using lldb's thread-format syntax."
},
"timeout": {
"type": "number",
"description": "Seconds to wait for launchCommands or attachCommands to establish a valid target."
},
"launchCommands": {
"type": "array",
"description": "lldb commands used to launch the program instead of lldb-dap doing it. The last of them must leave a valid, launched target.",
"items": {
"type": "string"
},
"default": []
},
"runInTerminal": {
"type": "boolean",
"description": "Launch the program in an integrated terminal, so that it can read from stdin.",
"default": false
},
"disableASLR": {
"type": "boolean",
"description": "Disable address space layout randomisation for the program.",
"default": true
},
"disableSTDIO": {
"type": "boolean",
"description": "Launch the program without stdin, stdout or stderr.",
"default": false
},
"shellExpandArguments": {
"type": "boolean",
"description": "Let a shell expand the program's arguments before launching it.",
"default": false
},
"detachOnError": {
"type": "boolean",
"description": "Detach from the program if an error is encountered while launching it.",
"default": false
}
}
},
"attach": {
"properties": {
"debuggerPath": {
"type": "string",
"markdownDescription": "The path to the lldb-dap executable to use."
},
"sourceFileMap": {
"type": "object",
"description": "Maps source paths recorded in the debug info to their location on disk, as if by 'settings set target.source-map'. Each key is the path as recorded in the debug info and each value is where that path is found locally.",
"additionalProperties": {
"type": "string"
}
},
"qtPrettyPrinters": {
"type": "boolean",
"description": "Load the Qt pretty-printers bundled with this extension by importing them as an lldb Python module.",
"default": false
},
"pid": {
"type": [
"number",
"string"
],
"description": "The process ID to which lldb should attach."
},
"program": {
"type": "string",
"description": "Path to the executable being debugged."
},
"coreFile": {
"type": "string",
"description": "Path to a core dump file to load instead of attaching to a live process."
},
"initCommands": {
"type": "array",
"description": "lldb commands run once the debugger has been created, before the target exists. The place for 'platform select', pretty printer scripts, and anything else that must precede the target.",
"items": {
"type": "string"
},
"default": []
},
"preRunCommands": {
"type": "array",
"description": "lldb commands run after the target is created but before the program is launched or attached to.",
"items": {
"type": "string"
},
"default": []
},
"postRunCommands": {
"type": "array",
"description": "lldb commands run once the program has been launched or attached to.",
"items": {
"type": "string"
},
"default": []
},
"stopCommands": {
"type": "array",
"description": "lldb commands run each time the program stops.",
"items": {
"type": "string"
},
"default": []
},
"exitCommands": {
"type": "array",
"description": "lldb commands run once the program has exited.",
"items": {
"type": "string"
},
"default": []
},
"terminateCommands": {
"type": "array",
"description": "lldb commands run when the debug session ends.",
"items": {
"type": "string"
},
"default": []
},
"platformName": {
"type": "string",
"description": "The lldb platform to select, as if by 'platform select'. Needed for remote targets."
},
"targetTriple": {
"type": "string",
"description": "The target triple to debug for, overriding the one recorded in the executable."
},
"debuggerRoot": {
"type": "string",
"description": "Directory lldb-dap chdirs to before doing anything else, so that relative paths in commands resolve predictably."
},
"enableAutoVariableSummaries": {
"type": "boolean",
"description": "Show auto-generated summaries for variables when no language-specific summary applies.",
"default": false
},
"enableSyntheticChildDebugging": {
"type": "boolean",
"description": "Alongside a synthetic child, also show the raw value it was synthesised from.",
"default": false
},
"displayExtendedBacktrace": {
"type": "boolean",
"description": "Include extended backtraces, where the platform provides them.",
"default": false
},
"customFrameFormat": {
"type": "string",
"description": "Format string for stack frame names, using lldb's frame-format syntax."
},
"customThreadFormat": {
"type": "string",
"description": "Format string for thread names, using lldb's thread-format syntax."
},
"timeout": {
"type": "number",
"description": "Seconds to wait for launchCommands or attachCommands to establish a valid target."
},
"attachCommands": {
"type": "array",
"description": "lldb commands used to attach instead of lldb-dap doing it. The last of them must leave a valid, attached target.",
"items": {
"type": "string"
},
"default": []
},
"waitFor": {
"type": "boolean",
"description": "Wait for the next instance of the program to be launched and attach to that, rather than requiring a pid.",
"default": false
}
}
}
},
"initialConfigurations": [
{
"type": "kdap-lldb",
"request": "launch",
"name": "Debug (LLDB)",
"program": "${workspaceFolder}/<your program>",
"args": [],
"cwd": "${workspaceFolder}",
"stopOnEntry": true
}
],
"configurationSnippets": [
{
"label": "LLDB: Launch",
"description": "Launch a program under lldb-dap",
"body": {
"type": "kdap-lldb",
"request": "launch",
"name": "${2:Launch}",
"program": "^\"\\${workspaceFolder}/${1:<your program>}\"",
"args": [],
"cwd": "^\"\\${workspaceFolder}\"",
"stopOnEntry": true
}
},
{
"label": "LLDB: Attach",
"description": "Attach lldb-dap to a running process",
"body": {
"type": "kdap-lldb",
"request": "attach",
"name": "${2:Attach}",
"program": "${1:<your program>}"
}
},
{
"label": "LLDB: Load Core Dump",
"description": "Load a core dump in lldb-dap",
"body": {
"type": "kdap-lldb",
"request": "attach",
"name": "${2:Core}",
"program": "${1:<your program>}",
"coreFile": "${1:<your program>}.core"
}
}
]
}
]
}
}