Skip to content

Commit c17a302

Browse files
RafaelGSSMaledong
andauthored
guide: add user journey live debugging document (#4772)
* doc: add live debugging diagnostics doc * fix fix the md formation by changing "-" to "*”。 * fix Fix by adding the "title" and "template" name * fix the link fix the link Co-authored-by: Maledong <[email protected]>
1 parent 038d4bd commit c17a302

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

locale/en/docs/guides/diagnostics/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ root-cause their issues.
1616
This is the available set of diagnostics guides:
1717

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

2021
[Diagnostics Working Group]: https://github.com/nodejs/diagnostics
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Live Debugging
3+
layout: docs.hbs
4+
---
5+
6+
# Live Debugging
7+
8+
* [Live Debugging](#live-debugging)
9+
* [My application doesn’t behave as expected](#my-application-doesnt-behave-as-expected)
10+
* [Symptoms](#symptoms)
11+
* [Debugging](#debugging)
12+
13+
In this document you can learn about how to live debug a Node.js process.
14+
15+
## My application doesn’t behave as expected
16+
17+
### Symptoms
18+
19+
The user may observe that the application doesn’t provide the expected output
20+
for certain inputs, for example, an HTTP server returns a JSON response where
21+
certain fields are empty. Various things can go wrong in the process but in this
22+
use case, we are mainly focused on the application logic and its correctness.
23+
24+
### Debugging
25+
26+
In this use case, the user would like to understand the code path that our
27+
application executes for a certain trigger like an incoming HTTP request. They
28+
may also want to step through the code and control the execution as well as
29+
inspect what values variables hold in memory.
30+
31+
* [Using Inspector](/en/docs/guides/diagnostics/live-debugging/using-inspector)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Using Inspector
3+
layout: docs.hbs
4+
---
5+
6+
# Using Inspector
7+
8+
In a local environment, we usually speak about live debugging where we attach a
9+
debugger to our application and we add breakpoints to suspend the program
10+
execution. Then we step through the code paths and inspect our heap over the
11+
different steps. Using the live debugger in production is usually not an option
12+
as we have limited access to the machine and we cannot interrupt the execution
13+
of the application as it handles a business-critical workload.
14+
15+
## How To
16+
17+
https://nodejs.org/en/docs/guides/debugging-getting-started/

0 commit comments

Comments
 (0)