Neovim for Beginners — JavaScript/TypeScript Debugging

Debug JavaScript or TypeScript applications using vscode-js-debug.

3 min readOct 26, 2022


Neovim for Beginners — JavaScript/TypeScript Debugging

Previously we use vscode-chrome-debug and vscode-node-debug2 to debug JavaScript/TypeScript applications. These two debuggers are deprecated.

In this article, we will configure Neovim to use vscode-js-debug for JavaScript and TypeScript debugging.

This article is part of the Neovim for Beginners series.

The Neovim configuration files are available in this repository.

Getting Started

In previous articles, we configured the debug adapters for Lua, Python, Rust, Go, and JavaScript/TypeScript applications. We also refactor the configuration to use the mason.nvim plugin that makes it easy to install any debuggers.

vscode-chrome-debug and vscode-node-debug2 debuggers that we used for JavaScript debugging are superseded by vscode-js-debug.

vscode-js-debug is a DAP-based JavaScript debugger. It debugs Node.js, Chrome, Edge, WebView2, VS Code extensions, and more.

We will configure and usenvim-dap, nvim-dap-vscode-js, and vscode-js-debug to debug JavaScript applications.


Let’s install these plugins using packer.nvim.

We install nvim-dap-vscode-js (line 12) and vscode-js-debug (line 13 — line 17).


We create the lua/config/dap/javascript.lua file with the following code snippet.




Software engineer, Data Science and ML practitioner.