Created
March 12, 2020 05:09
-
-
Save toddwseattle/fb315ffa4027f57eb76216074e2dfb8b to your computer and use it in GitHub Desktop.
example nx launch.json for use with vscode (place in .vscode)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "edge", | |
"request": "launch", | |
"name": "Launch Edge on localhost://4200 pe app", | |
"url": "http://localhost:4200", | |
"webRoot": "${workspaceFolder}/apps/pitch-evaluator" | |
}, | |
{ | |
"type": "chrome", | |
"request": "attach", | |
"name": "Attach to Chrome", | |
"port": 9222, | |
"webRoot": "${workspaceFolder}/apps/pitch-evaluator" | |
}, | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Launch Chrome against localhost:4200 for pitch evaluator", | |
"url": "http://localhost:4200", | |
"webRoot": "${workspaceFolder}/apps/pitch-evaluator" | |
}, | |
{ | |
"name": "Debug Jest Tests", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceFolder}/node_modules/@angular/cli/bin/ng", | |
"args": [ | |
"test", | |
"${input:libName}", | |
"--runInBand=true", | |
"--codeCoverage=false" | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"trace": "all" | |
}, | |
{ | |
"name": "Debug Jest Tests in Current File", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceFolder}/node_modules/@angular/cli/bin/ng", | |
"args": [ | |
"test", | |
"${input:libName}", | |
"--test-file", | |
"${fileBasename}", | |
"--runInBand=true", | |
"--codeCoverage=false" | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"trace": "all" | |
}, | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug fixupsessions", | |
"program": "${workspaceFolder}\\scripts\\lib\\scripts\\src\\fixupSessions.js", | |
"args": ["fixsession", "iYt5tVcEMRSiAhOzvNyt"], | |
"cwd": "${workspaceFolder}\\scripts\\lib\\scripts\\src", | |
"protocol": "inspector", | |
"outFiles": ["${workspaceFolder}/lib/scripts/src/**/*.js"] | |
}, | |
{ | |
"name": "Attach to Script Process on port 7777", | |
"type": "node", | |
"request": "attach", | |
"port": 7777 | |
} | |
], | |
"inputs": [ | |
// these options come from the names of your libraries as enumerated in nx.json..i manually put them in the pick list | |
{ | |
"type": "pickString", | |
"id": "libName", | |
"description": "Which nx project to run jest tests to debug?", | |
"options": [ | |
"pitch-evaluator", | |
"common", | |
"functions", | |
"fstransform", | |
"landing" | |
], | |
"default": "frameshare" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment