Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions locale/en/docs/guides/diagnostics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ root-cause their issues.
This is the available set of diagnostics guides:

* [Memory](/en/docs/guides/diagnostics/memory)
* [Live Debugging](/en/docs/guides/diagnostics/live-debugging)

[Diagnostics Working Group]: https://github.com/nodejs/diagnostics
31 changes: 31 additions & 0 deletions locale/en/docs/guides/diagnostics/live-debugging/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Live Debugging
layout: docs.hbs
---

# Live Debugging

* [Live Debugging](#live-debugging)
* [My application doesn’t behave as expected](#my-application-doesnt-behave-as-expected)
* [Symptoms](#symptoms)
* [Debugging](#debugging)

In this document you can learn about how to live debug a Node.js process.

## My application doesn’t behave as expected

### Symptoms

The user may observe that the application doesn’t provide the expected output
for certain inputs, for example, an HTTP server returns a JSON response where
certain fields are empty. Various things can go wrong in the process but in this
use case, we are mainly focused on the application logic and its correctness.

### Debugging

In this use case, the user would like to understand the code path that our
application executes for a certain trigger like an incoming HTTP request. They
may also want to step through the code and control the execution as well as
inspect what values variables hold in memory.

* [Using Inspector](/en/docs/guides/diagnostics/live-debugging/using-inspector)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Using Inspector
layout: docs.hbs
---

# Using Inspector

In a local environment, we usually speak about live debugging where we attach a
debugger to our application and we add breakpoints to suspend the program
execution. Then we step through the code paths and inspect our heap over the
different steps. Using the live debugger in production is usually not an option
as we have limited access to the machine and we cannot interrupt the execution
of the application as it handles a business-critical workload.

## How To

https://nodejs.org/en/docs/guides/debugging-getting-started/