Skip to content

Instantly share code, notes, and snippets.

@microshine
Last active October 22, 2018 08:01
Show Gist options
  • Save microshine/7079dd6340874e2fa9984a2f577cc1d6 to your computer and use it in GitHub Desktop.
Save microshine/7079dd6340874e2fa9984a2f577cc1d6 to your computer and use it in GitHub Desktop.
Launch TS script from vscode
{
"version": "0.2.0",
"configurations": [
{
"name": "Test all files",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"--no-timeouts",
"--colors",
"--require",
"ts-node/register",
"--watch-extensions",
"ts,tsx",
"${workspaceRoot}/test/**/*.{ts,tsx}"
],
"outputCapture": "std",
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Test current file",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"--no-timeouts",
"--colors",
"--require",
"ts-node/register",
"${relativeFile}"
],
"outputCapture": "std",
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Run current TS file",
"type": "node",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": [
"--require",
"ts-node/register"
],
"outputCapture": "std",
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment