GitXplorerGitXplorer
s

setup_vs_code_debug

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
d8265cd5dcb0e9e3d34cc93a31b42cfdc21c9ae5

catch promise rejection

committed 7 years ago
Unverified
3176b61ed9f4c04099140c815583e97e6c4133a7

1.2.3

committed 7 years ago
Unverified
0843ec288e18c81c67230b377bfdd6f95f04cdc0

used nvm.sh instead of nvm-exec

committed 7 years ago
Unverified
72c043161926d82578957f5749106f5a207a2a86

1.2.2

committed 7 years ago
Unverified
34aa5a8fcfd3ddb068b6381c7ca6ed3dd5f0fb8b

use nvm-exec instead of sourcing ~/.nvm/nvm.sh directly

committed 7 years ago
Unverified
b204bd719969cb7876aa30ca272916328016a0b3

merge conflict

sshola committed 7 years ago

README

The README file for this repository.

Setup Visual Studio Code Node Debugging

Microsoft Visual Studio Code is a great editor for NodeJS development, and the built in debugger is awesome. Except that it fails to start if you are using the latest versions of NodeJS... if you want to use new features like async/await, you will like this tool!

Debugging in Visual Studio Code

Installing

Prerequisites

npm i -g setup_vs_code_debug

Getting Started

Run these commands in your terminal:

cd <YOUR_PROJECT_DIR>
setup_vs_code_debug

The above command will configure the the most version of NodeJS to work with VS Code's debugger. If you would like to target a different version of NodeJS:

setup_vs_code_debug X.X.X

To start debugging, open any of your project JS files in VS Code and hit FN + F5 on a mac (try F5 or WIN + F5 on other systems).

You can always overwrite the version of Node to debug against by running the command again.

How To Debug NodeJS in Visual Studio Code

Under The Hood

.
├── .nvmrc
└── .vscode
    └── launch.json

The version of NodeJS you are debugging with in VS Code will be persisted in .nvmrc. To run your app with that version, type this into your terminal:

cd <YOUR_PROJECT_DIR>
nvm use
node <YOUR_JS_FILE>

Your VS Code Debugger config will be saved in .vscode/launch.json.

Uninstalling

You can safely remove setup_vs_code_debug at any time, and your VS code configs will still be saved.

npm uninstall -g setup_vs_code_debug

Found a bug? Want a new feature?

  • please create an issue on the github page

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments