forked from swc-project/vscode-swc-devtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
414 lines (414 loc) · 20.8 KB
/
Copy pathpackage.json
File metadata and controls
414 lines (414 loc) · 20.8 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
{
"name": "swc-dev",
"displayName": "swc developement",
"description": "",
"version": "0.0.7",
"preview": true,
"publisher": "swc",
"engines": {
"vscode": "^1.19.0"
},
"categories": [
"Debuggers",
"Other"
],
"activationEvents": [
"onCommand:workbench.action.tasks.runTask",
"onCommand:swc.dev.uiTest.update",
"onLanguage:rust-ui-test-output",
"onLanguage:rust",
"onDebug",
"workspaceContains:**/Cargo.toml"
],
"main": "./out/extension",
"extensionDependencies": [
"ms-vscode.cpptools",
"rust-lang.rust"
],
"contributes": {
"breakpoints": [
{
"language": "rust"
}
],
"views": {
"explorer": [
{
"id": "cratesExplorer",
"name": "Crates",
"when": "isCargoProject"
}
]
},
"commands": [
{
"command": "swc.dev.uiTest.update",
"title": "Update reference",
"category": "Swc"
},
{
"command": "rust.cratesExplorer.run",
"title": "Run",
"icon": {
"light": "resources/media/light/run.svg",
"dark": "resources/media/dark/run.svg"
},
"category": "Rust"
},
{
"command": "rust.cratesExplorer.debug",
"title": "Debug",
"icon": {
"light": "resources/media/light/debug.svg",
"dark": "resources/media/dark/debug.svg"
},
"category": "Rust"
}
],
"debuggers": [
{
"type": "rust",
"label": "rust: Launch (GDB / LLDB / VSDebug)",
"configurationAttributes": {
"launch": {
"required": [
"crate"
],
"properties": {
"crate": {
"type": "string",
"decsription": "Crate name.",
"default": ""
},
"targets": {
"type": "string",
"decsription": "e.g. ",
"default": ""
},
"cwd": {
"type": "string",
"description": "The working directory of the target",
"default": "."
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSON array of command line arguments to pass to the program when it is launched. Example [\"arg1\", \"arg2\"].",
"default": []
},
"env": {
"type": "object",
"description": "Environment variables to add to the environment for the program. Example: { \"RUST_LOG\": \"debug\" }.",
"properties": {
"name": "string",
"value": "string"
},
"default": {}
},
"pretty": {
"type": "boolean",
"description": "Enable pretty priting. Enabled by default.",
"default": true
},
"setupCommands": {
"type": "array",
"description": "One or more GDB/LLDB commands to execute in order to setup the underlying debugger. Example: \"setupCommands\": [ { \"text\": \"-enable-pretty-printing\", \"description\": \"Enable GDB pretty printing\", \"ignoreFailures\": true }].\n\nNote that recommended way to enable pretty printing is specifying \"pretty: true,\" instead of using this",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The debugger command to execute.",
"default": ""
},
"description": {
"type": "string",
"description": "Optional description for the command.",
"default": ""
},
"ignoreFailures": {
"type": "boolean",
"description": "If true, failures from the command should be ignored. Default value is false.",
"default": "false"
}
}
},
"default": []
},
"launchCompleteCommand": {
"enum": [
"exec-run",
"exec-continue",
"None"
],
"description": "The command to execute after the debugger is fully setup in order to cause the target process to run. Allowed values are \"exec-run\", \"exec-continue\", \"None\". The default value is \"exec-run\".",
"default": "exec-run"
},
"visualizerFile": {
"type": "string",
"description": ".natvis file to be used when debugging this process. This option is not compatible with GDB pretty printing. Please also see \"showDisplayString\" if using this setting.",
"default": ""
},
"showDisplayString": {
"type": "boolean",
"description": "When a visualizerFile is specified, showDisplayString will enable the display string. Turning this option on can cause slower performance during debugging.",
"default": "true"
},
"MIMode": {
"type": "string",
"description": "Indicates the console debugger that the MIDebugEngine will connect to. Allowed values are \"gdb\" \"lldb\".\n\n This is ignored if configured rustup toolchain is msvc.",
"default": ""
},
"miDebuggerPath": {
"type": "string",
"description": "The path to the mi debugger (such as gdb). When unspecified, it will search path first for the debugger.",
"default": ""
},
"miDebuggerServerAddress": {
"type": "string",
"description": "Network address of the MI Debugger Server to connect to (example: localhost:1234).",
"default": "serveraddress:port"
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop after launch.",
"default": true
},
"debugServerPath": {
"type": "string",
"description": "Optional full path to debug server to launch. Defaults to null.",
"default": ""
},
"debugServerArgs": {
"type": "string",
"description": "Optional debug server args. Defaults to null.",
"default": ""
},
"serverStarted": {
"type": "string",
"description": "Optional server-started pattern to look for in the debug server output. Defaults to null.",
"default": ""
},
"filterStdout": {
"type": "boolean",
"description": "Search stdout stream for server-started pattern and log stdout to debug output. Defaults to true.",
"default": "true"
},
"filterStderr": {
"type": "boolean",
"description": "Search stderr stream for server-started pattern and log stderr to debug output. Defaults to false.",
"default": "false"
},
"serverLaunchTimeout": {
"type": "integer",
"description": "Optional time, in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000.",
"default": "10000"
},
"coreDumpPath": {
"type": "string",
"description": "Optional full path to a core dump file for the specified program. Defaults to null.",
"default": ""
},
"externalConsole": {
"type": "boolean",
"description": "If true, a console is launched for the debuggee. If false, no console is launched. Note this option is ignored in some cases for technical reasons.",
"default": "false"
},
"sourceFileMap": {
"type": "object",
"description": "Optional source file mappings passed to the debug engine. Example: '{ \"/original/source/path\":\"/current/source/path\" }'",
"default": {
"<source-path>": "<target-path>"
}
},
"logging": {
"type": "object",
"description": "Optional flags to determine what types of messages should be logged to the Debug Console.",
"default": {},
"properties": {
"exceptions": {
"type": "boolean",
"description": "Optional flag to determine whether exception messages should be logged to the Debug Console. Defaults to true.",
"default": true
},
"moduleLoad": {
"type": "boolean",
"description": "Optional flag to determine whether module load events should be logged to the Debug Console. Defaults to true.",
"default": true
},
"programOutput": {
"type": "boolean",
"description": "Optional flag to determine whether program output should be logged to the Debug Console. Defaults to true.",
"default": true
},
"engineLogging": {
"type": "boolean",
"description": "Optional flag to determine whether diagnostic engine logs should be logged to the Debug Console. Defaults to false.",
"default": false
},
"trace": {
"type": "boolean",
"description": "Optional flag to determine whether diagnostic adapter command tracing should be logged to the Debug Console. Defaults to false.",
"default": false
},
"traceResponse": {
"type": "boolean",
"description": "Optional flag to determine whether diagnostic adapter command and response tracing should be logged to the Debug Console. Defaults to false.",
"default": false
}
}
},
"pipeTransport": {
"description": "When present, this tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between VS Code and the MI-enabled debugger backend executable (such as gdb).",
"type": "object",
"default": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'",
"pipeArgs": [],
"debuggerPath": "enter the path for the debugger on the target machine, for example /usr/bin/gdb"
},
"properties": {
"pipeCwd": {
"type": "string",
"description": "The fully qualified path to the working directory for the pipe program.",
"default": "/usr/bin"
},
"pipeProgram": {
"type": "string",
"description": "The fully qualified pipe command to execute.",
"default": "enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'"
},
"pipeArgs": {
"type": "array",
"description": "Command line arguments passed to the pipe program to configure the connection.",
"items": {
"type": "string"
},
"default": []
},
"debuggerPath": {
"type": "string",
"description": "The full path to the debugger on the target machine, for example /usr/bin/gdb.",
"default": "The full path to the debugger on the target machine, for example /usr/bin/gdb."
},
"pipeEnv": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Environment variables passed to the pipe program.",
"default": {}
}
}
}
}
}
},
"configurationSnippets": [
{
"label": "rust: Launch (GDB / LLDB / VSDebug)",
"description": "A new configuration for launching a mock debug program",
"body": {
"type": "rust",
"request": "launch",
"name": "${2:Launch Program}",
"program": "^\"\\${workspaceFolder}/${1:Program}\""
}
}
]
}
],
"taskDefinitions": [
{
"type": "cargo",
"required": [
"task"
],
"properties": {
"task": {
"type": "string",
"description": "The cargo task to customize"
},
"crate": {
"type": "string",
"description": "Name of the crate"
}
}
}
],
"menus": {
"editor/title": [
{
"command": "swc.dev.uiTest.update",
"group": "navigation",
"when": "resourceLangId == rust-ui-test-output"
}
],
"commandPalette": [
{
"command": "swc.dev.uiTest.update",
"when": "resourceLangId == rust-ui-test-output"
}
],
"view/title": [
{
"command": "rust.cratesExplorer.run",
"when": "view == cratesExplorer && viewItem != crate && viewItem != lib && viewItem != deps && viewItem != examples",
"group": "navigation@0"
},
{
"command": "rust.cratesExplorer.debug",
"when": "view == cratesExplorer && viewItem != crate && viewItem != lib && viewItem != deps && viewItem != examples && viewItem != testFiles && viewItem != benchFiles",
"group": "navigation@1"
}
],
"view/item/context": [
{
"command": "rust.cratesExplorer.run",
"when": "view == cratesExplorer && viewItem != crate && viewItem != lib && viewItem != deps && viewItem != examples",
"group": "testExplorer@0"
},
{
"command": "rust.cratesExplorer.debug",
"when": "view == cratesExplorer && viewItem != crate && viewItem != lib && viewItem != deps && viewItem != examples && viewItem != testFiles && viewItem != benchFiles",
"group": "testExplorer@1"
}
]
},
"languages": [
{
"id": "rust-ui-test-output",
"aliases": [
"Rust ui test"
],
"extensions": [
".stdout",
".stderr"
]
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "npm run compile && node ./node_modules/vscode/bin/test"
},
"dependencies": {
"glob": "^13.0.6",
"jsonstream": "^1.0.3",
"which": "^7.0.0"
},
"devDependencies": {
"@types/glob": "^9.0.0",
"@types/jsonstream": "^0.8.33",
"@types/mocha": "^10.0.10",
"@types/node": "^26.1.1",
"@types/which": "^3.0.4",
"typescript": "^7.0.2",
"vscode": "^1.1.37"
}
}