Debug a Node.js Application Running in a Docker Container

This blog post shows how you can debug a simple Node.js application running in a Docker container. The tutorial is laid out in a fashion that allows you to use it as a reference while you’re building your own Node.js application and is intended for readers who have prior exposure to JavaScript programming and Docker.

Prerequisites

  1. Docker. For details about installing Docker, refer to the Install Docker page.
  1. Node.js 10 or higher. To check out if Node.js is installed on your computer, fire up a terminal window and type the following command:
Shell
 




x


 
1
node -v


If Node.js is already installed, you'll see something like the following: