Skip to content

Instantly share code, notes, and snippets.

@joelharkes
Last active September 18, 2022 08:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joelharkes/8a015929c1bef2430512b6ad1e1c1c0c to your computer and use it in GitHub Desktop.
Save joelharkes/8a015929c1bef2430512b6ad1e1c1c0c to your computer and use it in GitHub Desktop.
Debug ts-mocha in vs code (visual studio code)
{
"version": "0.2.0",
"configurations": [
{
"name": "Run ts-mocha File",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/ts-mocha",
"runtimeArgs": [
"${file}"
],
"protocol": "inspector"
}
]
}
@joelharkes
Copy link
Author

joelharkes commented Nov 21, 2017

You can add environment variables if u need them for test environment.

eg:

"env": {
  "NODE_ENV": "test"
}

@walterdl
Copy link

walterdl commented Apr 2, 2020

A late comment but: you saved me from minutes or hours of trying. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment