Download and install Visual Studio Code
If you need to, open https://code.visualstudio.com/download, download, and run the Visual Studio Code. Proceed to install it by double-clicking the installer.
- ES6 code snippets
- Node.js Extension Pack
- Live Server
- Debugger for Chrome
To install an extension, check the marketplace (https://marketplace.visualstudio.com/) and tap the Install button. Customize Visual Studio Code's workspace parameters to allow you to personalize your programming environment. To view the workspace options, go to File > Preferences > Settings.
Download and install Node.js
Create a new file
Step 1: Launch Visual Studio Code
Step 2: Make a new file by selecting File > New File
Step 3: Save the file with a .js extension, like “output.js.” “books.js.”
Note: The file prefix can be any name of your choice.
Write some Java codes
This basic code outputs “Hello World!” to the terminal.
Open the terminal
Run the code
1. Using the built-in Node.js interpreter
Step 2: Choose “Node.js” as the environment and select the Run button icon
2. Making use of the Live Server extension
Step 2: Right-click to select a file and choose “Open with Live Server.”
Step 3: Visual Studio Code executes the file via a live server and displays the results on a web browser.
1. Establish breakpoints
Step 2: Choose the breakpoint by clicking on the line number.
Step 3: A red circle will show on the line number to indicate that the breakpoint has been set.
2. Begin debugging
Step 1: Select the Debug button in the top menu bar or press Ctrl + Shift + D to begin debugging.
Step 2: Click the green arrow to begin debugging.
Visual Studio Code has several collaboration tools and extensions, such as Live Sharing and Git integration. These technologies enable you to exchange code and interact in real-time with other developers, making it simpler to work on large projects and coordinate your efforts.