---
title: "Discussion on \"Best Practices for Debugging in Node.js\" | Hashnode"
description: "Discussion on \"Best Practices for Debugging in Node.js\". An important part of development is the ability to make the application bug-free and defect-free. It is almost impossible to write a perfect application, but we follow TDD (test-driven development), which helps us test our code before running. If som..."
url: "https://hashnode.com/posts/best-practices-for-debugging-in-nodejs/6406ca74cf80b647b4e87d1a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Best Practices for Debugging in Node.js](https://amnah.com/best-practices-for-debugging-in-nodejs?utm_source=hashnode&utm_medium=feed)

An important part of development is the ability to make the application bug-free and defect-free. It is almost impossible to write a perfect application, but we follow TDD (test-driven development), which helps us test our code before running. If som...

Mar 7, 2023 · 5 min read · amnah.com  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#debugging](https://hashnode.com/tag/debugging)

## Written by

[Amnah khatun](https://hashnode.com/@amnah)

@amnah

  
[View profile](https://hashnode.com/@amnah)

## Responses 1

Markdown supported · ⌘↵ to post

[Semir Teskeredzic](https://hashnode.com/@semirte)

[Mar 7, 2023](https://hashnode.com/posts/best-practices-for-debugging-in-nodejs/6406ca74cf80b647b4e87d1a/comment/6406ec29c9fcfad441631ebe)

Quite educational piece on debugging in Node Amnah, good job! One thing that could be super useful is to use a flag --inspect-brk which will break the execution immediately so you can place your breakpoints and debug. It was a revelation for me to find out Node debugging through that green button on DevTools.

[Amnah khatun](https://hashnode.com/@amnah)

[Mar 8, 2023](https://hashnode.com/posts/best-practices-for-debugging-in-nodejs/6406ca74cf80b647b4e87d1a/comment/6406ec29c9fcfad441631ebe#reply-640816b7bdde4ade71258338)

thank you. Glad you liked it.
