A simple VS Code extension that adds a "Open in JavaScript Debug Terminal" option to your right-click context menu. Perfect for quickly debugging Node.js, JavaScript, and TypeScript projects!
This extension adds a convenient right-click option that opens a JavaScript Debug Terminal in any folder or file location you choose. The debug terminal is specially designed for JavaScript/TypeScript development and debugging.
A JavaScript Debug Terminal is a special terminal in VS Code that:
- β Allows you to debug Node.js applications directly
 - β Sets breakpoints and step through code
 - β Inspect variables and call stacks
 - β Perfect for testing Node.js scripts and applications
 
Learn more about JavaScript Debug Terminal in VS Code docs β
- Open VS Code
 - Go to the Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Search for "Open in JavaScript Debug Terminal"
 - Click Install
 
- In the Explorer panel, right-click any folder
 - Select "Open in JavaScript Debug Terminal"
 - A debug terminal opens in that folder!
 
- Right-click any JavaScript/TypeScript file or Node.js config file
 - Select "Open in JavaScript Debug Terminal"
 - A debug terminal opens in the file's folder!
 
Supported files: .js, .ts, .jsx, .tsx, .json, package.json, package-lock.json, yarn.lock, tsconfig.json, .nvmrc, .node-version
- Right-click anywhere inside a supported file
 - Select "Open in JavaScript Debug Terminal"
 - A debug terminal opens in the file's folder!
 
- Press 
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "Open in JavaScript Debug Terminal"
 - Press Enter
 
Stop dealing with reused task terminals! This extension adds CodeLens links above each npm script in package.json:
- Open your 
package.jsonfile - You'll see two links above each script line:
- "βΆ Run in Terminal" - Runs in a new regular terminal
 - "π Debug Script" - Runs in a JavaScript Debug Terminal
 
 - Click either link to run the script!
 
Alternative: Use Keyboard Shortcut
- Place cursor on any script line
 - Press 
Cmd+Shift+R(Mac) orCtrl+Shift+R(Windows/Linux) - Runs in a JavaScript Debug Terminal
 
Why is this better than the native "Run Script" hover?
- β Each script gets its own terminal (no reused task terminals!)
 - β Clean, dedicated terminal for each run
 - β Choose between regular terminal or debug terminal
 - β No more dealing with the task system's terminal reuse
 - β Always visible - no need to hover!
 
Optional: Disable Native Hover If you want to completely hide VS Code's native "Run Script" / "Debug Script" hover:
- Open Settings (
Cmd+,orCtrl+,) - Search for: 
openJsDebugTerminalHere.disableNativeNpmScriptHover - Enable the checkbox
 - Reload VS Code
 
This will use only your extension's CodeLens links instead of the native hover actions.
- π― Smart Context Menu: Right-click folders or files to open debug terminals
 - β‘ npm Script Runner: Run npm scripts in proper terminals (not reused task terminals!)
 - π CodeLens Integration: Adds "βΆ Run in Terminal" and "π Debug Script" links above each npm script
 - βοΈ Disable Native Hover: Optional setting to hide VS Code's default "Run Script" hover
 - β¨οΈ Keyboard Shortcuts: Quick access with 
Cmd+Shift+R/Ctrl+Shift+Rin package.json - π Works Everywhere: Explorer, editor, or command palette
 - π¦ Node.js Focused: Special support for 
package.json,yarn.lock,tsconfig.json, and more - π Intelligent Fallbacks: Always works, even if debug features are unavailable
 - π Multi-workspace Support: Works with multiple workspace folders
 - β‘ Zero Configuration: No setup required - just install and use!
 
- VS Code: Version 1.74 or higher
 - Operating System: Windows, macOS, or Linux
 - JavaScript Debugger: Built into VS Code (no additional installation needed)
 
- Node.js: Version 20+ (required for building and publishing)
 - npm: Usually comes with Node.js
 - Git: For version control
 
- Install the extension
 - Open any JavaScript or Node.js project in VS Code
 - Right-click a folder in Explorer
 - Choose "Open in JavaScript Debug Terminal"
 - Try running: 
node --versionor any Node.js script! 
This extension uses a smart 3-tier fallback system:
- π₯ First Choice: Uses VS Code's built-in debug terminal command
 - π₯ Second Choice: Creates a terminal using the JavaScript Debug Terminal profile
 - π₯ Final Fallback: Creates a regular terminal (still useful!)
 
This ensures the extension always works, regardless of your VS Code configuration.
- Make sure you're right-clicking on a folder or JavaScript/TypeScript file
 - Try restarting VS Code after installation
 
- This is normal! The extension falls back to a regular terminal if debug features aren't available
 - You'll see a notification explaining this
 - The terminal still opens in the correct folder and is fully functional
 
- Make sure you have a folder open in VS Code
 - Try opening a file or folder first, then run the command
 
- Make sure you're viewing a 
package.jsonfile - Check that the file has a 
"scripts"section - Try reloading VS Code (
Cmd+Shift+Pβ "Reload Window") - CodeLens may be disabled globally - check setting: 
editor.codeLens 
- Enable the setting to hide native hover: 
openJsDebugTerminalHere.disableNativeNpmScriptHover - This will use only the extension's CodeLens links
 - You'll need to reload VS Code after changing this setting
 
- Issues: Report bugs or request features
 - Discussions: Ask questions or share feedback
 
See CHANGELOG.md for detailed release history.
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
# Package the extension
npm run package- Press 
F5in VS Code to launch Extension Development Host - Test the extension in the new VS Code window
 - Check the Debug Console for extension logs
 
For maintainers who want to publish updates locally (without GitHub Actions):
Quick Start:
# On macOS/Linux:
./publish.sh
# On Windows:
publish.batManual Process: See LOCAL_PUBLISHING_GUIDE.md for detailed step-by-step instructions.
- Fork the repository
 - Create a feature branch: 
git checkout -b feature-name - Make your changes and add tests
 - Commit your changes: 
git commit -m 'Add feature' - Push to the branch: 
git push origin feature-name - Submit a pull request
 
This extension is licensed under the MIT License. Feel free to use, modify, and distribute as needed.