Minimal working example for reproducing a bug when debugging in ts-node with Visual Studio Code
These instructions will get you a copy of this project up and running on your local machine for development and testing purposes.
- Node.js - JavaScript run-time environment
- Visual Studio Code - Code editor redefined and optimized for building and debugging modern web and cloud applications
Follow these steps to reproduce the bug:
- Clone this project
- Open the project's root folder in VS Code
- Run
npm i
in the terminal to install all dependencies - Set a breakpoint in
src/lib.ts
on line4
- Switch to the
Run
view using the side menu - Select the run configuration
Launch with ts-node
- Press
F5
to start debugging
Now the debugger should stop at the specified breakpoint, but it doesn't.
- Install the VS Code extension JavaScript Debugger (Nightly) (
ms-vscode.js-debug-nightly
) - In
.vscode\settings.json
setdebug.node.useV3
totrue
- Press
F5
to start debugging
Now the debugger does in fact stop at the specified breakpoint.
- TypeScript - A typed superset of JavaScript that compiles to plain JavaScript
- ts-node - TypeScript execution and REPL for node.js
- Robin Hartmann - robin-hartmann
This project is licensed under the MIT License - see the LICENSE file for details.