
If we look at the sidebar on the left of our code, we can see a VARIABLES category with various sub-categories like Block and Local. This request will run the function linked to POST /users and halt at the breakpoint in its first line. API Setupįirst, we create a new Node js project and install our dependencies.Ĭonst express = require ( " express " ) const bodyParser = require ( " body-parser " ) const users = [' localhost:9999/users You can then go on to easily add API endpoints and make an API call. We will create a simple API with the Express framework and then try to debug it with the help of VS Code’s debugging features instead of the console.

We will also use cURL to send requests to our API. Visual Studio Code is a “streamlined code editor with support for development operations like debugging, task running and version control.” It allows us to link functions directly to API endpoints, which is a quick and simple way to build an API. WhatĮxpress is a “minimalist web framework for Nodejs”.
POSTMAN VSCODE HOW TO
There are many guides out there for finding the best node js bootcamp, but in this tutorial we’ll learn how to debug an Express-based API with the help of Visual Studio Code, or VS Code for short.

Node js is a cross platform and open source JavaScript runtime environment that allows the JavaScript to be run on the server-side. In JavaScript, the first stop for a debugging task is often logging to the console, but using a debugger can give us a more integrated experience. API creation isn’t exempt from this fact, so sooner or later we’ll need to debug it. When we create software, we rarely do it without errors.
