GitXplorerGitXplorer
s

setup_vs_code_debug

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
c784bd7b7b3db356540010004024db42fec36c83

- clean up launch.json formatting

sshola committed 7 years ago
Unverified
d02e21b3e3e25521ee717f6c7eefc2eab9d1b2ba

- clean up launch.json formatting

sshola committed 7 years ago
Unverified
8ee914f6a2aa62b56a3af6ec613469731bdda9f3

fix success message

committed 7 years ago
Unverified
32e2898d2bd01302d7547daa24dff5b41b7e6737

- unit test with node unit

committed 7 years ago
Unverified
26afdca7ee548eb3ef32c9b70a808ca87531bc63

improve parsing of version number; use most recent node version; add jsdocs; modify README.md and console output

committed 7 years ago
Unverified
b62012ca5afb18d38f15517e5a917728b1e1b6b4

0.1.5

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