-
Notifications
You must be signed in to change notification settings - Fork 11
/
package.json
538 lines (538 loc) · 20.4 KB
/
package.json
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
{
"name": "r-debugger",
"displayName": "R Debugger",
"description": "R Debugger for VS Code",
"version": "0.5.5",
"publisher": "RDebugger",
"license": "MIT",
"author": {
"name": "Manuel Hentschel"
},
"rPackageInfo": {
"name": "vscDebugger",
"required": "0.5.0",
"recommended": "0.5.2",
"warnIfNewer": "0.6.0"
},
"repository": {
"type": "git",
"url": "https://github.com/ManuelHentschel/VSCode-R-Debugger"
},
"preview": true,
"bugs": {
"url": "https://github.com/ManuelHentschel/VSCode-R-Debugger/issues"
},
"icon": "images/Rlogo.png",
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"Debuggers"
],
"activationEvents": [
"onDebugDynamicConfigurations:R-Debugger",
"onDebug"
],
"keywords": [
"R",
"R Language",
"Debugger"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "r.debugger.installOrUpdateRPackage",
"title": "Install or update the required R Package (quick)",
"category": "R Debugger"
},
{
"command": "r.debugger.installRPackage",
"title": "Install the required R Package (slow, multiple sources)",
"category": "R Debugger"
},
{
"command": "r.debugger.removeRPackage",
"title": "Remove the required R Package",
"category": "R Debugger"
},
{
"command": "r.debugger.showDataViewer",
"title": "Show in data viewer"
}
],
"menus": {
"debug/variables/context": [
{
"command": "r.debugger.showDataViewer",
"when": "debugType == 'R-Debugger'"
}
],
"commandPalette": [
{
"command": "r.debugger.showDataViewer",
"when": "false"
}
]
},
"languages": [
{
"id": "r",
"extensions": [
".r",
".R"
],
"aliases": [
"R",
"r"
]
}
],
"breakpoints": [
{
"language": "r"
}
],
"debuggers": [
{
"type": "R-Debugger",
"languages": [
"r"
],
"label": "R Debugger",
"program": "./out/debugAdapter.js",
"runtime": "node",
"configurationAttributes": {
"attach": {
"properties": {
"supportsWriteToStdinEvent": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to use custom events to request text written to R's stdin. Is used to implement next/step/continue requests."
},
"useCustomSocket": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to use a separate socket for custom events. Usually necessary in attach mode."
},
"customPort": {
"type": "number",
"default": 0,
"markdownDescription": "Port number of custom socket. Leave emtpy/0 to assign automatically."
},
"customHost": {
"type": "string",
"default": "localhost",
"markdownDescription": "Host name of custom socket. Leave empty to use localhost."
},
"port": {
"type": "number",
"default": 18721,
"markdownDescription": "Port number where vscDebugger is listening for DAP messages."
},
"host": {
"type": "string",
"default": "localhost",
"markdownDescription": "Host name where vscDebugger is listening for DAP messages."
},
"splitOverwrittenOutput": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to show the overwritten output in the normal stdout/stderr as well."
},
"overwritePrint": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `print()` function (direct calls to `base::print()` are not affected)."
},
"overwriteStr": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `str()` function (direct calls to `base::str()` are not affected)."
},
"overwriteMessage": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `message()` function (direct calls to `base::message()` are not affected)."
},
"overwriteCat": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `cat()` function (direct calls to `base::cat()` are not affected)."
},
"overwriteSource": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `source()` function (direct calls to `base::source()` are not affected)."
},
"setBreakpointsInPackages": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to enable breakpoints in exported functions from ALL packages. Usually, `debuggedPackages` is preferred."
},
"includePackageScopes": {
"type": "boolean",
"default": false,
"markdownDescription": "Set to true to show package scopes in the variable window."
},
"debuggedPackages": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Packages to be debugged. Are loaded before launching the R script/file/function, and can contain breakpoints."
}
}
},
"launch": {
"properties": {
"debugMode": {
"type": "string",
"enum": [
"function",
"file",
"workspace"
],
"enumDescriptions": [
"Debug a single main-function",
"Run an R file",
"Start an empty R workspace"
],
"markdownDescription": "Debug a single main-FUNCTION, run an R FILE, or just start an empty R WORKSPACE",
"default": "file"
},
"allowGlobalDebugging": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to allow debugging in the global workspace after running the function/file."
},
"workingDirectory": {
"type": "string",
"markdownDescription": "Absolute path to a directory. Is switched to using `setwd()` after launching R.",
"default": "${workspaceFolder}"
},
"launchDirectory": {
"type": "string",
"markdownDescription": "Absolute path to a directory. The R process is launched in this directory.",
"default": "${workspaceFolder}"
},
"file": {
"type": "string",
"markdownDescription": "Absolute path to an R file",
"default": "${file}"
},
"mainFunction": {
"type": "string",
"default": "main",
"markdownDescription": "The name of the main function, if a single function is being debugged. Must be callable without arguments."
},
"splitOverwrittenOutput": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to show the overwritten output in the normal stdout/stderr as well."
},
"overwritePrint": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `print()` function (direct calls to `base::print()` are not affected)."
},
"overwriteStr": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `str()` function (direct calls to `base::str()` are not affected)."
},
"overwriteMessage": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `message()` function (direct calls to `base::message()` are not affected)."
},
"overwriteCat": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `cat()` function (direct calls to `base::cat()` are not affected)."
},
"overwriteSource": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `source()` function (direct calls to `base::source()` are not affected)."
},
"overwriteLoadAll": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to attach a modified `load_all()` function (requries pkgload, direct calls to `pkgload::load_all()` are not affected)."
},
"overwriteHelp": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to register a new S3 print method for `help_files_with_topic` to use the help panel from vscode-R."
},
"setBreakpointsInPackages": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to enable breakpoints in exported functions from ALL packages. Usually, `debuggedPackages` is preferred."
},
"includePackageScopes": {
"type": "boolean",
"default": false,
"markdownDescription": "Set to true to show package scopes in the variable window."
},
"commandLineArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"--vanilla"
],
"markdownDescription": "Additional command line arguments used when launching R."
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"markdownDescription": "Environment variables to be set when launching R."
},
"debuggedPackages": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Packages to be debugged. Are loaded before launching the R script/file/function, and can contain breakpoints."
},
"loadPackages": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"."
],
"markdownDescription": "Paths of packages to be loaded with `pkgload::load_all` before launching the debugger. Requires `pkgload` to be installed."
},
"loadSilently": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to suppress messages while loading packages specified in `loadPackages`."
}
}
}
},
"configurationSnippets": [
{
"label": "R: Launch Workspace",
"body": {
"type": "R-Debugger",
"name": "Launch R-Workspace",
"request": "launch",
"debugMode": "workspace",
"workingDirectory": "${workspaceFolder}"
}
},
{
"label": "R: Debug File",
"body": {
"type": "R-Debugger",
"name": "Debug R-File",
"request": "launch",
"debugMode": "file",
"workingDirectory": "${workspaceFolder}",
"file": "${file}"
}
},
{
"label": "R: Debug Function",
"body": {
"type": "R-Debugger",
"name": "Debug R-Function",
"request": "launch",
"debugMode": "function",
"workingDirectory": "${workspaceFolder}",
"file": "${file}",
"mainFunction": "main",
"allowGlobalDebugging": false
}
},
{
"label": "R: Debug Package with pkload",
"body": {
"type": "R-Debugger",
"name": "Debug R-Package",
"request": "launch",
"debugMode": "workspace",
"workingDirectory": "${workspaceFolder}",
"includePackageScopes": true,
"loadPackages": [
"."
]
}
},
{
"label": "R: Attach to process",
"body": {
"type": "R-Debugger",
"name": "Attach to R process",
"request": "attach",
"splitOverwrittenOutput": true
}
}
]
}
],
"configuration": [
{
"type": "object",
"title": "R Debugger",
"properties": {
"r.rpath.windows": {
"type": "string",
"default": "",
"description": "Path to an R executable for Windows. Must be \"vanilla\" R, not radian etc.!"
},
"r.rpath.mac": {
"type": "string",
"default": "",
"description": "Path to an R executable for macOS. Must be \"vanilla\" R, not radian etc.!"
},
"r.rpath.linux": {
"type": "string",
"default": "",
"description": "Path to an R executable for Linux. Must be \"vanilla\" R, not radian etc.!"
},
"r.debugger.commandLineArgs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Additional command line arguments used when launching R."
},
"r.debugger.timeouts.startup": {
"type": "number",
"default": 2000,
"markdownDescription": "The maximum time in ms that is waited for R to startup. Is also used for some other timeouts."
},
"r.debugger.timeouts.terminate": {
"type": "number",
"default": 50,
"markdownDescription": "Time in ms that is waited when terminating R to allow messages etc. to appear."
},
"r.debugger.timeouts.prompt": {
"type": "number",
"default": 0,
"markdownDescription": "Time in ms that is waited before handling input prompts on stdout (to avoid async issues)."
},
"r.debugger.checkVersion": {
"type": "string",
"enum": [
"none",
"required",
"recommended"
],
"default": "recommended",
"markdownDescription": "Whether to check the version of the R package before launching the debugger."
},
"r.debugger.trackTerminals": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to track terminals opened while using the extension. Recommended for debugging in attached mode on windows."
},
"rdebugger.rterm.windows": {
"type": "string",
"default": "",
"markdownDescription": "R.exe path for Windows. If empty, the registry and PATH are searched for an R executable.",
"markdownDeprecationMessage": "Deprecated. Use `#r.rpath.windows#` instead.",
"deprecationMessage": "Deprecated. Use r.rpath.windows instead."
},
"rdebugger.rterm.mac": {
"type": "string",
"default": "",
"markdownDescription": "R path for macOS. If empty, the PATH is searched for an R executable.",
"markdownDeprecationMessage": "Deprecated. Use `#r.rpath.mac#` instead.",
"deprecationMessage": "Deprecated. Use r.rpath.mac instead."
},
"rdebugger.rterm.linux": {
"type": "string",
"default": "",
"markdownDescription": "R path for Linux. If empty, the PATH is searched for an R executable.",
"markdownDeprecationMessage": "Deprecated. Use `#r.rpath.linux#` instead.",
"deprecationMessage": "Deprecated. Use r.rpath.linux instead."
},
"rdebugger.rterm.args": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDeprecationMessage": "Deprecated. Use `#r.debugger.commandLineArgs#` instead.",
"deprecationMessage": "Deprecated. Use r.debugger.commandLineArgs instead.",
"markdownDescription": "Additional command line arguments used when launching R."
},
"rdebugger.timeouts.startup": {
"type": "number",
"default": 0,
"markdownDeprecationMessage": "Deprecated. Use `#r.debugger.timeouts.startup#` instead.",
"deprecationMessage": "Deprecated. Use r.debugger.timeouts.startup instead.",
"markdownDescription": "The maximum time in ms that is waited for R to startup. Is also used for some other timeouts."
},
"rdebugger.timeouts.terminate": {
"type": "number",
"default": 0,
"markdownDeprecationMessage": "Deprecated. Use `#r.debugger.timeouts.terminate#` instead.",
"deprecationMessage": "Deprecated. Use r.debugger.timeouts.terminate instead.",
"markdownDescription": "Time in ms that is waited when terminating R to allow messages etc. to appear."
},
"rdebugger.timeouts.prompt": {
"type": "number",
"default": 0,
"markdownDeprecationMessage": "Deprecated. Use `#r.debugger.timeouts.prompt#` instead.",
"deprecationMessage": "Deprecated. Use r.debugger.timeouts.prompt instead.",
"markdownDescription": "Time in ms that is waited before handling input prompts on stdout (to avoid async issues)."
},
"rdebugger.checkVersion": {
"type": "string",
"default": "",
"markdownDeprecationMessage": "Deprecated. Use `#r.debugger.checkVersion#` instead.",
"deprecationMessage": "Deprecated. Use r.debugger.checkVersion instead.",
"markdownDescription": "Whether to check the version of the R package before launching the debugger."
},
"rdebugger.trackTerminals": {
"type": "boolean",
"default": false,
"markdownDeprecationMessage": "Deprecated. Use `#r.debugger.trackTerminals#` instead.",
"deprecationMessage": "Deprecated. Use r.debugger.trackTerminals instead.",
"markdownDescription": "Whether to track terminals opened while using the extension. Recommended for debugging in attached mode on windows."
}
}
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"lint": "eslint src --ext ts",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/node": "^13.13.27",
"@types/semver": "^7.3.4",
"@types/vscode": "^1.75.0",
"@types/winreg": "^1.2.30",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"eslint": "^7.14.0",
"typescript": "^4.1.2",
"@vscode/debugprotocol": "^1.65.0"
},
"dependencies": {
"loglevel": "^1.7.0",
"net": "^1.0.2",
"semver": "^7.3.2",
"tree-kill": "^1.2.2",
"winreg": "^1.2.4"
}
}