<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi" -->

---
title: Debugging Node.js, The Right Way | daily.dev
description: Learn how to debug Node.js code using browser devtools, the difference between --inspect and --inspect-brk, debugging node scripts launched with other...
canonical: https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Debugging Node.js, The Right Way | daily.dev
og:description: Learn how to debug Node.js code using browser devtools, the difference between --inspect and --inspect-brk, debugging node scripts launched with other...
og:url: https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi
og:image: https://api.daily.dev/og/posts/34tUd7Rhi.png
og:image:alt: Debugging Node.js, The Right Way
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging Node.js, The Right Way

**[builder.io](https://daily.dev/sources/builderio)** · 1 min read · 216 upvotes · 15 comments

## Summary

Learn how to debug Node.js code using browser devtools, the difference between --inspect and --inspect-brk, debugging node scripts launched with other commands, and debugging directly in your IDE or in VS Code for client-side code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.builder.io/blog/debug-nodejs>

## Community discussion

Top comments from developers on daily.dev.

**@makinox** · 5 upvotes

> Yeah, but, console.logging will be more comfortable always. (Personal opinion)

**@furkangulsen** · 2 upvotes

> Nice solution, but as a backend developer, I develop with tests instead of Chrome. That's why it doesn't work for me :D

**@m\_usman** · 0 upvotes

> Great, I also write test cases. But one time I had to debug the schedular, for that this was useful. Thanks for sharing

**@ankurparchani** · 0 upvotes

> I'd prefer ndb more

**@rama4zis** · 0 upvotes

> This is great, usually I'm using console log

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#nodejs](https://daily.dev/tags/nodejs), [#vscode](https://daily.dev/tags/vscode)

[View this post on daily.dev](https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Debugging Node.js, The Right Way","url":"https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi"},"datePublished":"2023-02-23T19:31:20.122Z","dateModified":"2026-03-15T03:28:55.889Z","description":"Learn how to debug Node.js code using browser devtools, the difference between --inspect and --inspect-brk, debugging node scripts launched with other...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/02cbb7ed0bef66c23095e8e6f0ff3423?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/02cbb7ed0bef66c23095e8e6f0ff3423?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"builder.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"builder.io","logo":"https://media.daily.dev/image/upload/s--jap1dv3o--/f_auto/v1721914613/squads/builderio","url":"https://daily.dev/squads/builderio"},"commentCount":15,"discussionUrl":"https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":216},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":15}],"keywords":"devtools,nodejs,vscode","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"builder.io","item":"https://daily.dev/squads/builderio"},{"@type":"ListItem","position":3,"name":"Debugging Node.js, The Right Way"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/debugging-node-js-the-right-way-34tud7rhi","comment":[{"@type":"Comment","text":"Yeah, but, console.logging will be more comfortable always. (Personal opinion)","datePublished":"2023-02-23T19:46:02.218Z","url":"https://daily.dev/posts/34tUd7Rhi#c-ROSbIravt","author":{"@type":"Person","name":"Jesús Bossa","url":"https://daily.dev/makinox","image":"https://lh3.googleusercontent.com/a/AEdFTp6NJGFSUX0WmIDgZFsv0Tu5EDYQx829RiRjzW5IcEw=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"Nice solution, but as a backend developer, I develop with tests instead of Chrome. That’s why it doesn’t work for me :D","datePublished":"2023-02-23T20:50:26.222Z","url":"https://daily.dev/posts/34tUd7Rhi#c-MScQks8Ia","author":{"@type":"Person","name":"Furkan Gülşen","url":"https://daily.dev/furkangulsen","image":"https://lh3.googleusercontent.com/a-/AOh14GiHbpEwx1nhLkgl7NY7wDIp03f-b23Awzk51opkRQ=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Great, I also write test cases. But one time I had to debug the schedular, for that this was useful. Thanks for sharing","datePublished":"2023-02-24T01:27:26.604Z","url":"https://daily.dev/posts/34tUd7Rhi#c-ituGKYK1G","author":{"@type":"Person","name":"Muhammad Usman","url":"https://daily.dev/m_usman","image":"https://media.daily.dev/image/upload/v1677336333/avatars/avatar_9K8dwbsVqOkZ3Bj99gbky.jpg"}},{"@type":"Comment","text":"I’d prefer ndb more","datePublished":"2023-02-24T06:22:52.904Z","url":"https://daily.dev/posts/34tUd7Rhi#c-LI2zJgkbp","author":{"@type":"Person","name":"Ankur Parchani","url":"https://daily.dev/ankurparchani","image":"https://lh3.googleusercontent.com/a/AEdFTp71fisHRAowrf54iibImj8qi4nSQWpWBIMxuMV_=s96-c"}},{"@type":"Comment","text":"This is great, usually I’m using console log","datePublished":"2023-02-24T02:41:34.585Z","url":"https://daily.dev/posts/34tUd7Rhi#c-1gcccINkB","author":{"@type":"Person","name":"Rama Aditya Saputra","url":"https://daily.dev/rama4zis","image":"https://avatars.githubusercontent.com/u/28669091?v=4"}}]}
```

