-
Notifications
You must be signed in to change notification settings - Fork 531
/
launch.json
531 lines (531 loc) · 17.9 KB
/
launch.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
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// Update /build-tools/packages/bundle-size-tools/src/utilities/gitCommands.ts to your remote (i.e. upstream instead of main)
// Don't forget to run `npm run bundle-analysis:collect`
// Reminder, update the command values
"command": "npx danger pr https://github.com/microsoft/FluidFramework/pull/{A-RECENT-PR-HERE} -d {WORKSPACE WITH /'s}/build-tools/packages/build-tools/dist/bundleSizeAnalysis/dangerfile.js",
"name": "bundleSizeAnalysis",
"request": "launch",
"type": "node-terminal",
"env": {
// Your ADO PAT (Personal Access Token) User settings > Personal Access Tokens > New Token (check read permissions, likely Build, Release, Packaging, and Test Management)
"ADO_API_TOKEN": "",
// Your Github PAT (Personal Access Token) Your Icon > Settings > Developer settings > Personal Access Tokens > Fine-grained tokens (Public Repositories (read-only) should be enough)
"DANGER_GITHUB_API_TOKEN": "",
"TARGET_BRANCH_NAME": "main",
},
},
{
"name": "codeCoverageAnalysis",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/run.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["report", "codeCoverage"],
"env": {
// Your ADO PAT (Personal Access Token) User settings > Personal Access Tokens > New Token (check read permissions, likely Build, Release, Packaging, and Test Management)
"ADO_API_TOKEN": "",
"GITHUB_API_TOKEN": "",
"GITHUB_PR_NUMBER": "",
"ADO_BUILD_ID": "",
"ADO_CI_BUILD_DEFINITION_ID_BASELINE": "48",
"ADO_CI_BUILD_DEFINITION_ID_PR": "11",
"TARGET_BRANCH_NAME": "main",
"GITHUB_REPOSITORY_NAME": "microsoft/FluidFramework",
},
},
{
"name": "npm test build-cli",
"cwd": "${workspaceFolder}/build-tools/packages/build-cli",
"request": "launch",
"runtimeArgs": ["run-script", "test"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"type": "node",
},
{
"name": "npm test version-tools",
"cwd": "${workspaceFolder}/build-tools/packages/version-tools",
"request": "launch",
"runtimeArgs": ["run-script", "test"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"type": "node",
},
{
"name": "fluid-build",
"program": "${workspaceFolder}/build-tools/packages/build-tools/bin/fluid-build",
"cwd": "${workspaceFolder}/packages/common/container-definitions",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": [".", "--task", "build"],
},
{
"name": "flub",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["release", "-g", "client", "-v", "--no-policyCheck"],
},
{
"name": "flub check policy",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["check", "policy"],
},
{
"name": "flub check policy --fix",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["check", "policy", "--fix", "-v", "--excludeHandler", "assert-short-codes"],
},
{
"name": "flub generate bundleStats",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["generate", "bundleStats", "-v"],
},
{
"name": "flub generate releaseNotes",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["generate", "releaseNotes", "-g", "client", "-t", "minor", "-v"],
},
{
"name": "flub generate packlist",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["generate", "packlist", "-g", "build-tools", "-v"],
},
{
// Runs the `flub release report --all` command with a debugger attached.
"name": "flub release report",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["release", "report", "-g", "build-tools", "-v"],
},
{
// Runs the `flub release fromTag build-tools_v0.26.1` command with a debugger attached.
"name": "flub release fromTag build-tools_v0.26.1",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["release", "fromTag", "build-tools_v0.26.1", "--json"],
},
{
// Runs the `flub list --private` command with a debugger attached.
"name": "flub list",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["list", "--private", "-g", "build-tools", "-v"],
},
{
// Runs the `flub modify fluid-imports` command with a debugger attached.
"name": "flub modify fluid-imports",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}/packages/framework/aqueduct",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["modify", "fluid-imports", "-v"],
},
{
// Runs the `flub generate upcoming` command with a debugger attached.
"name": "flub generate upcoming",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["generate", "upcoming", "-g", "client", "-v"],
},
{
// Runs the `flub generate changeset` command with a debugger attached.
"name": "flub generate changeset",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}/build-tools",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["generate", "changeset", "-v", "-b", "main"],
},
{
// Runs the `flub exec` command with a debugger attached.
"name": "flub exec",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}/build-tools",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
},
{
// Runs the `flub test-only-filter` command with a debugger attached.
"name": "flub test-only-filter",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}/build-tools",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["test-only-filter", "--all"],
},
{
"name": "flub bump build-tools",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": [
"bump",
"build-tools",
"-t",
"patch",
"--verbose",
"--no-commit",
"--no-install",
],
},
{
"name": "flub bump deps",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": [
"bump",
"deps",
"build-tools",
"--updateChecker",
"homegrown",
"--prerelease",
"--no-commit",
"--no-install",
],
},
{
"name": "flub generate typetests",
"program": "${workspaceFolder}/build-tools/packages/build-cli/bin/dev.js",
"cwd": "${workspaceFolder}",
// It's sometimes useful to run this command on a single package during debugging
// "cwd": "${workspaceFolder}/packages/dds/sequence",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": ["generate", "typetests", "--dir", "."],
},
{
"name": "fluid-type-test-generator",
"program": "${workspaceFolder}/build-tools/packages/build-tools/bin/fluid-type-test-generator",
"cwd": "${workspaceFolder}",
// It's sometimes useful to run this command on a single package during debugging
// "cwd": "${workspaceFolder}/packages/dds/sequence",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"args": [],
},
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
},
{
"type": "node",
"request": "launch",
"name": "Matrix Bench",
"cwd": "${workspaceFolder}/packages/dds/matrix/bench",
"args": [
"-r",
"ts-node/register",
"-r",
"source-map-support/register",
"src/index.ts",
"--runInBand",
],
"env": {
"TS_NODE_PROJECT": "tsconfig.json",
},
// "skipFiles": ["<node_internals>/**"],
"console": "integratedTerminal",
"smartStep": true,
},
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"cwd": "${workspaceFolder}/",
"program": "${workspaceFolder}/common/tools/node_modules/mocha/bin/_mocha",
"args": ["--recursive", "dist/test/", "--grep Checked"],
"internalConsoleOptions": "openOnSessionStart",
},
{
"name": "Chrome",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"url": "localhost:3000/sharedText/oct18-3",
"pathMapping": {
"/public/scripts/dist/src/": "${workspaceFolder}/dist",
},
},
{
"type": "node",
"request": "attach",
"sourceMaps": true,
"protocol": "inspector",
"name": "Mocha attach",
"port": 9229,
},
{
"type": "node",
"request": "launch",
"name": "Beast",
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"protocol": "inspector",
"program": "${workspaceFolder}/dist/test/merge-tree/beastTest.js",
},
{
"type": "node",
"request": "launch",
"name": "Farm",
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/packages/runtime/sequence/dist/test/*.js"],
"protocol": "inspector",
"program": "${workspaceFolder}/packages/runtime/sequence/dist/test/testFarm.js",
},
{
"type": "node",
"request": "attach",
"name": "Attach to alfred",
"address": "localhost",
"port": 5858,
"restart": true,
"sourceMaps": true,
"localRoot": "${workspaceFolder}/server/routerlicious",
"remoteRoot": "/usr/src/server",
"protocol": "inspector",
"trace": "sm",
},
{
"type": "node",
"request": "attach",
"name": "Attach to riddler",
"address": "localhost",
"port": 5865,
"restart": true,
"sourceMaps": true,
"localRoot": "${workspaceFolder}/server/routerlicious",
"remoteRoot": "/usr/src/server",
"protocol": "inspector",
"trace": "sm",
},
{
"type": "node",
"request": "attach",
"name": "Attach to deli",
"address": "localhost",
"port": 5859,
"restart": true,
"sourceMaps": true,
"localRoot": "${workspaceFolder}/server/routerlicious",
"remoteRoot": "/usr/src/server",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"protocol": "inspector",
"trace": "sm",
},
{
"type": "node",
"request": "attach",
"name": "Attach to scriptorium",
"address": "localhost",
"port": 5860,
"restart": true,
"sourceMaps": true,
"localRoot": "${workspaceFolder}/server/routerlicious",
"remoteRoot": "/usr/src/server",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"protocol": "inspector",
"trace": "sm",
},
{
"type": "node",
"request": "attach",
"name": "Attach to copier",
"address": "localhost",
"port": 5861,
"restart": true,
"sourceMaps": true,
"localRoot": "${workspaceFolder}/server/routerlicious",
"remoteRoot": "/usr/src/server",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"protocol": "inspector",
"trace": "sm",
},
{
"type": "node",
"request": "launch",
"name": "Debug Current Mocha Test (auto build)",
"env": {
// "fluid__test__driver": "odsp", //values: local, t9s, r11s, odsp,
// "fluid__test__odspEndpointName": "odsp-df", //values: odsp, odsp-df
// "fluid__test__r11sEndpointName": "docker", //values: frs, docker
// "fluid__test__backCompat": "FULL", //values: FULL This tests loader-driver compatibility for describeCompat tests
// "FLUID_TEST_VERBOSE": "1",
},
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/mocha",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/mocha.cmd",
},
"sourceMaps": true,
"program": "${file}",
"args": [
// "--fgrep", // Uncomment to filter by test case name
// "<test case name>",
"--no-timeouts",
"--exit",
],
"cwd": "${fileDirname}",
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"outFiles": [
// This config avoids loading dependent packages' test files, while using the same technique
// as the "Debug Current Mocha Test (*)" config to load source maps for test files in the current
// package.
// This reduces the number of source files VSCode needs to load to debug the e2e tests
// considerably, which decreases the time it takes to start debugging.
"${workspaceFolder}/**/lib/**/!(*.spec,*.test,*.tests).js",
"${fileDirname}/../../lib/**/*.js",
"${fileDirname}/../../../lib/**/*.js",
"${fileDirname}/../../../../lib/**/*.js",
"${workspaceFolder}/**/dist/**/!(*.spec,*.test,*.tests).js",
"${fileDirname}/../../dist/**/*.js",
"${fileDirname}/../../../dist/**/*.js",
"${fileDirname}/../../../../dist/**/*.js",
// e2e tests load ESM modules since test-end-to-end-tests specifies "type": "module" in its package.json.
// This ensures that source maps are loaded for those files as well (e.g. so putting a breakpoint in
// containerRuntime.ts while debugging a test in test-end-to-end-tests works)
"${workspaceFolder}/**/lib/**/!(*.spec,*.test,*.tests).mjs",
"${fileDirname}/../../lib/**/*.mjs",
"${fileDirname}/../../../lib/**/*.mjs",
"${fileDirname}/../../../../lib/**/*.mjs",
],
"preLaunchTask": "Build Current Tests",
"internalConsoleOptions": "openOnSessionStart",
},
{
"type": "node",
"request": "launch",
"name": "Debug Current Mocha Test (ESM-lib;no build)",
"env": {
// "fluid__test__driver": "odsp", //values: local, t9s, r11s, odsp,
// "fluid__test__odspEndpointName": "odsp-df", //values: odsp, odsp-df
// "fluid__test__r11sEndpointName": "docker", //values: frs, docker
// "fluid__test__backCompat": "FULL", //values: FULL This tests loader-driver compatibility for describeCompat tests
// "FLUID_TEST_VERBOSE": "1",
},
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"sourceMaps": true,
"args": [
"--no-timeouts",
"--exit",
"../../lib/test/${fileBasenameNoExtension}.js",
"../../../lib/test/**/${fileBasenameNoExtension}.js",
"../../../../lib/test/**/${fileBasenameNoExtension}.js",
],
"cwd": "${fileDirname}",
// These skipped files contain exceptions that are consistently thrown during test setup
// You can comment out this part if you want to debug these files
"skipFiles": [
"<node_internals>/**",
// @fluid-internal/mocha-test-setup is resolved first using esm resolution algorithm first before cjs resolution algorithm (require)
"**/node_modules/mocha/lib/nodejs/esm-utils.js",
// We pass multiple glob patterns to mocha (as seen above) to look for the correct spec file to debug
// Two of these will always throw file not found error, so we skip them here
"**/node_modules/mocha/lib/cli/lookup-files.js",
// There's an empty catch here for CommonJS default export support
"**/node_modules/uuid/dist/v35.js",
// test-version-utils checks for valid semver version first and handles ranges seperately.
"**/node_modules/semver/classes/semver.js",
],
"outFiles": [
"${fileDirname}/../../lib/**/*.js",
"${fileDirname}/../../../lib/**/*.js",
"${fileDirname}/../../../../lib/**/*.js",
],
},
{
"type": "node",
"request": "launch",
"name": "Debug Current Mocha Test (CommonJS-dist;no build)",
"env": {
// "fluid__test__driver": "odsp", //values: local, t9s, r11s, odsp,
// "fluid__test__odspEndpointName": "odsp-df", //values: odsp, odsp-df
// "fluid__test__r11sEndpointName": "docker", //values: frs, docker
// "fluid__test__backCompat": "FULL", //values: FULL This tests loader-driver compatibility for describeCompat tests
// "FLUID_TEST_VERBOSE": "1",
},
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"sourceMaps": true,
"args": [
"--no-timeouts",
"--exit",
"../../dist/test/${fileBasenameNoExtension}.js",
"../../../dist/test/**/${fileBasenameNoExtension}.js",
"../../../../dist/test/**/${fileBasenameNoExtension}.js",
],
"cwd": "${fileDirname}",
"outFiles": [
"${fileDirname}/../../dist/**/*.js",
"${fileDirname}/../../../dist/**/*.js",
"${fileDirname}/../../../../dist/**/*.js",
],
},
{
"type": "node",
"request": "launch",
"name": "Debug Current Jest Test (JS)",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"cwd": "${fileDirname}/..",
"args": ["--verbose", "-i", "--no-cache", "${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
},
],
}