-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpackage.json
More file actions
632 lines (632 loc) · 21.2 KB
/
package.json
File metadata and controls
632 lines (632 loc) · 21.2 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
{
"name": "debug-value-editor",
"private": true,
"displayName": "JS Debug Value Editor (Experimental)",
"description": "This extension allows to edit and view values of a debugee with a full text editor. Currently only supports javascript debug adaptors.",
"keywords": [
"debugger",
"debug",
"editor",
"javascript"
],
"icon": "docs/logo.drawio.png",
"version": "0.2.2",
"license": "MIT",
"publisher": "ms-vscode",
"enabledApiProposals": [],
"readme": "./README.md",
"engines": {
"vscode": "^1.108.0"
},
"categories": [
"Debuggers"
],
"activationEvents": [
"onFileSystem:debug-value",
"onLanguage:javascript",
"onLanguage:typescript",
"onCommand:debug-value-editor.debug-and-send-request",
"onStartupFinished"
],
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode-debug-value-editor"
},
"main": "./dist/entry.js",
"contributes": {
"commands": [
{
"command": "debug-value-editor.edit-property",
"title": "Edit Property",
"category": "Debug Value Editor"
},
{
"command": "observableDevTools.reloadResolvedLocations",
"title": "Reload Resolved Locations",
"category": "Observable Dev Tools"
}
],
"views": {
"debug-value-editor": [
{
"id": "available-properties",
"name": "Available Properties",
"type": "tree",
"when": "debug-value-editor.has-available-properties",
"icon": "$(symbol-property)"
}
]
},
"viewsContainers": {
"activitybar": [
{
"id": "debug-value-editor",
"title": "Debug Value Editor",
"icon": "$(debug)"
}
]
},
"languageModelTools": [
{
"name": "listDebugSessions",
"canBeReferencedInPrompt": true,
"toolReferenceName": "listDebugSessions",
"displayName": "List Debug Sessions",
"modelDescription": "List all active debug sessions in a hierarchy. Returns IDs (format: id:N-time:DDThh:mm:ss), names, expression language IDs, and active status. Note: Many more debugging tools (evaluate, step, inspect variables, etc.) become available once you start a debug session using launchNodeRepl, launchDenoRepl, launchNodeProgram, or startDebugSession.",
"inputSchema": {
"type": "object",
"properties": {}
}
},
{
"name": "startDebugSession",
"canBeReferencedInPrompt": true,
"toolReferenceName": "startDebugSession",
"displayName": "Start Debug Session",
"modelDescription": "Start a new debug session with an arbitrary debug configuration. Supports any debug type (pwa-node, pwa-chrome, python, etc.) with full configuration options. Returns the debug session ID. Once started, additional tools for evaluation, stepping, inspection, and more become available.",
"inputSchema": {
"type": "object",
"properties": {
"configuration": {
"type": "object",
"description": "The VS Code debug configuration object. Must include 'type' (e.g., 'pwa-node', 'pwa-chrome', 'python') and 'request' ('launch' or 'attach'). Other properties depend on the debug type. Common properties: 'name' (session name), 'program' (file to debug), 'cwd' (working directory), 'args' (command-line arguments), 'url' (for browser debugging), 'port' (for attach).",
"properties": {
"type": {
"type": "string",
"description": "The debug adapter type (e.g., 'pwa-node', 'pwa-chrome', 'node', 'chrome', 'python', 'cppdbg')"
},
"request": {
"type": "string",
"enum": [
"launch",
"attach"
],
"description": "Whether to launch a new process or attach to an existing one"
},
"name": {
"type": "string",
"description": "A name for the debug session (optional, will be auto-generated if not provided)"
}
},
"required": [
"type",
"request"
],
"additionalProperties": true
}
},
"required": [
"configuration"
]
}
},
{
"name": "launchNodeProgram",
"canBeReferencedInPrompt": true,
"toolReferenceName": "launchNodeProgram",
"displayName": "Launch Node.js Program",
"modelDescription": "Launch a new Node.js debug session for a JavaScript/TypeScript file. Returns the debug session ID. Once started, additional tools for evaluation, stepping, inspection, and more become available.",
"inputSchema": {
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "The absolute path to the JavaScript or TypeScript file to debug"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional command-line arguments to pass to the program"
},
"stopOnEntry": {
"type": "boolean",
"description": "Whether to stop execution at the first line of the program (default: false)"
},
"cwd": {
"type": "string",
"description": "The working directory for the program"
}
},
"required": [
"program"
]
}
},
{
"name": "launchNodeRepl",
"canBeReferencedInPrompt": true,
"toolReferenceName": "launchNodeRepl",
"displayName": "Launch Node.js REPL",
"modelDescription": "PREFERRED: Launch an interactive Node.js REPL in debug mode. Use this instead of running scripts via terminal when you need to quickly evaluate JavaScript/TypeScript code - no temporary files needed! Just launch the REPL and use evaluateExpressionInDebugSession to run code. Perfect for quick calculations, testing code snippets, exploring APIs, or prototyping. The session persists state between evaluations. Returns the debug session ID. Once started, evaluation and many other debugging tools become available.",
"inputSchema": {
"type": "object",
"properties": {
"cwd": {
"type": "string",
"description": "The working directory for the REPL"
}
}
}
},
{
"name": "stopDebugSession",
"canBeReferencedInPrompt": true,
"toolReferenceName": "stopDebugSession",
"displayName": "Stop Debug Session",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Stop a running debug session.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session to stop (format: id:N-time:DDThh:mm:ss)"
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "restartDebugSession",
"canBeReferencedInPrompt": true,
"toolReferenceName": "restartDebugSession",
"displayName": "Restart Debug Session",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Restart a debug session with the same configuration. Returns the new debug session ID.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session to restart (format: id:N-time:DDThh:mm:ss)"
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "evaluateExpressionInDebugSession",
"canBeReferencedInPrompt": true,
"toolReferenceName": "evaluateExpressionInDebugSession",
"displayName": "Evaluate Expression in Debug Session",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Evaluate an expression in a specific debug session. If evaluation takes longer than timeoutMs, returns a requestId that can be used with getEvaluationResult to check the result later.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
},
"expression": {
"type": "string",
"description": "The expression to evaluate in the debug session"
},
"timeoutMs": {
"type": "number",
"description": "Timeout in milliseconds (default: 1000). If evaluation takes longer, returns a requestId for later retrieval."
}
},
"required": [
"debugSessionId",
"expression"
]
}
},
{
"name": "getEvaluationResult",
"canBeReferencedInPrompt": true,
"toolReferenceName": "getEvaluationResult",
"displayName": "Get Evaluation Result",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Get the result of a pending evaluation by its requestId. Use this after evaluateExpressionInDebugSession times out.",
"inputSchema": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "The requestId returned from a timed-out evaluation"
},
"timeoutMs": {
"type": "number",
"description": "Timeout in milliseconds (default: 1000). If still pending, returns the same requestId."
}
},
"required": [
"requestId"
]
}
},
{
"name": "stepInto",
"canBeReferencedInPrompt": true,
"toolReferenceName": "stepInto",
"displayName": "Step Into",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Step into the next function call. Returns the new location with source code context (3 lines above and below).",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "stepOver",
"canBeReferencedInPrompt": true,
"toolReferenceName": "stepOver",
"displayName": "Step Over",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Step over the current line. Returns the new location with source code context (3 lines above and below).",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "stepOut",
"canBeReferencedInPrompt": true,
"toolReferenceName": "stepOut",
"displayName": "Step Out",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Step out of the current function. Returns the new location with source code context (3 lines above and below).",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "runToLine",
"canBeReferencedInPrompt": true,
"toolReferenceName": "runToLine",
"displayName": "Run to Line",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Continue execution until reaching the specified line. Sets a temporary breakpoint and continues. Returns the stop location with source code context.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
},
"filePath": {
"type": "string",
"description": "The absolute path to the source file"
},
"line": {
"type": "number",
"description": "The line number to run to (1-indexed)"
}
},
"required": [
"debugSessionId",
"filePath",
"line"
]
}
},
{
"name": "getStackTrace",
"canBeReferencedInPrompt": true,
"toolReferenceName": "getStackTrace",
"displayName": "Get Stack Trace",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Get the call stack of the paused debug session. Returns up to maxFrames frames with the top frame including source code context. If there are more frames, middle frames are skipped.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
},
"maxFrames": {
"type": "number",
"description": "Maximum number of frames to return (default: 10). Top frames get priority, middle frames are skipped if needed."
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "getLocalVariables",
"canBeReferencedInPrompt": true,
"toolReferenceName": "getLocalVariables",
"displayName": "Get Local Variables",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Get local variables in the current stack frame of a paused debug session.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
},
"maxVariables": {
"type": "number",
"description": "Maximum number of variables to return (default: 20). Long values are truncated."
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "getLineContext",
"canBeReferencedInPrompt": true,
"toolReferenceName": "getLineContext",
"displayName": "Get Line Context",
"modelDescription": "Get source code context around a specific line. Returns 3 lines above, the target line (marked with >), and 3 lines below with line numbers.",
"inputSchema": {
"type": "object",
"properties": {
"filePath": {
"type": "string",
"description": "The absolute path to the source file"
},
"line": {
"type": "number",
"description": "The target line number (1-indexed)"
}
},
"required": [
"filePath",
"line"
]
}
},
{
"name": "setBreakpoint",
"canBeReferencedInPrompt": true,
"toolReferenceName": "setBreakpoint",
"displayName": "Set Breakpoint",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Set a breakpoint at a specific line in a source file. Returns the actual line where the breakpoint was set (may differ from requested) and the source code context.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss)"
},
"filePath": {
"type": "string",
"description": "The absolute path to the source file"
},
"line": {
"type": "number",
"description": "The line number where to set the breakpoint (1-indexed)"
}
},
"required": [
"debugSessionId",
"filePath",
"line"
]
}
},
{
"name": "captureDomNodeScreenshot",
"canBeReferencedInPrompt": true,
"toolReferenceName": "captureDomNodeScreenshot",
"displayName": "Capture DOM Node Screenshot",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Capture a screenshot of a DOM element in a browser debug session. The expression should evaluate to a DOM element (e.g., document.querySelector('.my-class') or a variable holding a DOM element). Returns the screenshot as an image along with element information. Only works with browser/chrome debug sessions.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss). Must be a browser/chrome debug session."
},
"expression": {
"type": "string",
"description": "A JavaScript expression that evaluates to a DOM element (e.g., 'document.querySelector(\"#myElement\")', 'document.body', or a variable name holding a DOM element)"
}
},
"required": [
"debugSessionId",
"expression"
]
}
},
{
"name": "getLoadedScripts",
"canBeReferencedInPrompt": true,
"toolReferenceName": "getLoadedScripts",
"displayName": "Get Loaded Scripts",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "List all scripts loaded in a JS debug session. Supports filtering by regex pattern and pagination. Returns script IDs (needed for getScriptSource), URLs, line counts, and source map info. Max ~40KB output, will truncate if exceeded.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss). Must be a JS debug session."
},
"searchPattern": {
"type": "string",
"description": "Optional regex pattern to filter scripts by URL (case-insensitive)"
},
"offset": {
"type": "number",
"description": "Starting index for pagination (default: 0)"
},
"limit": {
"type": "number",
"description": "Maximum number of scripts to return (default: 50)"
}
},
"required": [
"debugSessionId"
]
}
},
{
"name": "getScriptSource",
"canBeReferencedInPrompt": true,
"toolReferenceName": "getScriptSource",
"displayName": "Get Script Source",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "Get the source code of a loaded script with line numbers. Use getLoadedScripts first to get script IDs. Supports two modes: (1) Without searchPattern: returns lines with pagination. (2) With searchPattern: returns only matching lines with ±contextLines of context. Max ~40KB output, will truncate if exceeded.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss). Must be a JS debug session."
},
"scriptId": {
"type": "string",
"description": "The script ID from getLoadedScripts"
},
"searchPattern": {
"type": "string",
"description": "Optional regex pattern to search within the script. If provided, returns only matching lines with context."
},
"offset": {
"type": "number",
"description": "Starting line (0-indexed, without searchPattern) or starting match index (with searchPattern). Default: 0"
},
"limit": {
"type": "number",
"description": "Maximum lines to return (without searchPattern) or max matches to return (with searchPattern). Default: 100"
},
"contextLines": {
"type": "number",
"description": "Lines of context around each match when using searchPattern (default: 5)"
}
},
"required": [
"debugSessionId",
"scriptId"
]
}
},
{
"name": "launchDenoRepl",
"canBeReferencedInPrompt": true,
"toolReferenceName": "launchDenoRepl",
"displayName": "Launch Deno REPL",
"modelDescription": "PREFERRED for npm packages: Launch a Deno REPL in debug mode. Deno auto-fetches npm packages without manual installation! Use 'await import(\"npm:package-name\")' to import any npm package. Perfect for quick experiments with external packages. Example: const _ = await import('npm:lodash'). Requires Deno to be installed. Returns the debug session ID. Once started, evaluation and many other debugging tools become available.",
"inputSchema": {
"type": "object",
"properties": {
"cwd": {
"type": "string",
"description": "The working directory for the REPL"
}
}
}
},
{
"name": "cdpRequest",
"canBeReferencedInPrompt": true,
"toolReferenceName": "cdpRequest",
"displayName": "CDP Request (Advanced)",
"when": "debug-value-editor.hasDebugSessions",
"modelDescription": "WARNING: Low-level tool - only use if other tools don't provide the needed functionality! Send a raw Chrome DevTools Protocol (CDP) request. This gives direct access to CDP methods like Runtime.*, Debugger.*, DOM.*, Network.*, etc. Refer to https://chromedevtools.github.io/devtools-protocol/ for available methods. Only works with JS debug sessions.",
"inputSchema": {
"type": "object",
"properties": {
"debugSessionId": {
"type": "string",
"description": "The ID of the debug session (format: id:N-time:DDThh:mm:ss). Must be a JS debug session."
},
"method": {
"type": "string",
"description": "The CDP method to call (e.g., 'Runtime.evaluate', 'DOM.getDocument', 'Network.enable')"
},
"params": {
"type": "object",
"description": "The parameters to pass to the CDP method (method-specific)",
"additionalProperties": true
}
},
"required": [
"debugSessionId",
"method"
]
}
}
]
},
"scripts": {
"build": "npm run build-ts && npm run build-vsix",
"build-ts": "tsc -p ./",
"build-vsix": "vsce package --out extension.vsix",
"vscode:prepublish": "",
"dev": "tsc -watch -p ./",
"get-types": "dts dev",
"patch-prerelease": "node ./scripts/applyPatchForPrerelease.js"
},
"devDependencies": {
"@types/node": "^13.13.5",
"@types/vscode": "^1.108.0",
"@types/ws": "^8.5.10",
"@vscode/dts": "^0.4.0",
"@vscode/vsce": "^3.7.1",
"typescript": "^5.5.0-dev.20240425"
},
"dependencies": {
"@hediet/node-reload": "^0.10.0",
"devtools-protocol": "^0.0.1419081",
"ws": "^8.17.1"
},
"files": [
"dist/**",
"docs/**",
"LICENSE",
"node_modules/"
]
}