Comparing version 4.2.0 to 4.2.1
{ | ||
"name": "tsx", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -227,2 +227,92 @@ # tsx <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/v/tsx"></a> <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/dm/tsx"></a> <a href="https://packagephobia.now.sh/result?p=tsx"><img src="https://packagephobia.now.sh/badge?p=tsx"></a> | ||
### VS Code debugging | ||
#### Setup | ||
Create the following configuration file in your project to setup debugging in VS Code: | ||
`.vscode/launch.json` | ||
```json5 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
/* | ||
Each config in this array is an option in the debug drop-down | ||
See below for configurations to add... | ||
*/ | ||
], | ||
} | ||
``` | ||
#### Debugging method 1: Run tsx directly from VSCode | ||
1. Add the following configuration to the `configurations` array in `.vscode/launch.json`: | ||
```json5 | ||
{ | ||
"name": "tsx", | ||
"type": "node", | ||
"request": "launch", | ||
// Debug current file in VSCode | ||
"program": "${file}", | ||
/* | ||
Path to tsx binary | ||
Assuming locally installed | ||
*/ | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/tsx", | ||
/* | ||
Open terminal when debugging starts (Optional) | ||
Useful to see console.logs | ||
*/ | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
// Files to exclude from debugger (e.g. call stack) | ||
"skipFiles": [ | ||
// Node.js internal core modules | ||
"<node_internals>/**", | ||
// Ignore all dependencies (optional) | ||
"${workspaceFolder}/node_modules/**", | ||
], | ||
} | ||
``` | ||
2. In VSCode, open the file you want to run | ||
3. Go to VSCode's debug panel, select "tsx" in the drop down, and hit the play button (<kbd>F5</kbd>). | ||
#### Debugging method 2: Attach to a running Node.js process | ||
> This method works for any Node.js process and it's not specific to tsx | ||
1. Add the following configuration to the `configurations` array in `.vscode/launch.json`: | ||
```json | ||
{ | ||
"name": "Attach to process", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 9229, | ||
"skipFiles": [ | ||
// Node.js internal core modules | ||
"<node_internals>/**", | ||
// Ignore all dependencies (optional) | ||
"${workspaceFolder}/node_modules/**", | ||
], | ||
} | ||
``` | ||
2. Run tsx with `--inspect-brk` in a terminal window: | ||
```sh | ||
tsx --inspect-brk ./your-file.ts | ||
``` | ||
3. Go to VSCode's debug panel, select "Attach to process" in the drop down, and hit the play button (<kbd>F5</kbd>). | ||
See the [VSCode documentation on _Launch Configuration_](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration) for more information. | ||
<br> | ||
@@ -229,0 +319,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
389492
1552
427