From 2b82daf19bbede46784358c4f32b623432f0f687 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Mon, 15 Aug 2022 17:18:34 -0300 Subject: [PATCH 1/4] doc: add live debugging diagnostics doc --- locale/en/docs/guides/diagnostics/index.md | 1 + .../diagnostics/live-debugging/index.md | 31 +++++++++++++++++++ .../live-debugging/using-inspector.md | 12 +++++++ 3 files changed, 44 insertions(+) create mode 100644 locale/en/docs/guides/diagnostics/live-debugging/index.md create mode 100644 locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md diff --git a/locale/en/docs/guides/diagnostics/index.md b/locale/en/docs/guides/diagnostics/index.md index 6500b24795145..9ef6d6b48f278 100644 --- a/locale/en/docs/guides/diagnostics/index.md +++ b/locale/en/docs/guides/diagnostics/index.md @@ -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 diff --git a/locale/en/docs/guides/diagnostics/live-debugging/index.md b/locale/en/docs/guides/diagnostics/live-debugging/index.md new file mode 100644 index 0000000000000..200e50c67406f --- /dev/null +++ b/locale/en/docs/guides/diagnostics/live-debugging/index.md @@ -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/) diff --git a/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md b/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md new file mode 100644 index 0000000000000..094c3fca3cc37 --- /dev/null +++ b/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md @@ -0,0 +1,12 @@ +# 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/ From 5065999bd6f81dd3cfc1f964718330fc5c247042 Mon Sep 17 00:00:00 2001 From: Maledong Date: Wed, 17 Aug 2022 11:53:24 +0800 Subject: [PATCH 2/4] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix the md formation by changing "-" to "*”。 --- locale/en/docs/guides/diagnostics/live-debugging/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en/docs/guides/diagnostics/live-debugging/index.md b/locale/en/docs/guides/diagnostics/live-debugging/index.md index 200e50c67406f..3bbf0603b62f1 100644 --- a/locale/en/docs/guides/diagnostics/live-debugging/index.md +++ b/locale/en/docs/guides/diagnostics/live-debugging/index.md @@ -28,4 +28,4 @@ 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/) +* [Using Inspector](/en/docs/guides/diagnostics/live-debugging/using-Inspector/) From c5e39a6e3d59dcec76725b70133f72b50ccc1714 Mon Sep 17 00:00:00 2001 From: Maledong Date: Wed, 17 Aug 2022 11:58:33 +0800 Subject: [PATCH 3/4] fix Fix by adding the "title" and "template" name --- .../guides/diagnostics/live-debugging/using-inspector.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md b/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md index 094c3fca3cc37..beccef8223e3a 100644 --- a/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md +++ b/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md @@ -1,3 +1,8 @@ +--- +title: Using Inspector +layout: docs.hbs +--- + # Using Inspector In a local environment, we usually speak about live debugging where we attach a From a0b432aaf74da9e786fe56bff62a2fa52c69ab09 Mon Sep 17 00:00:00 2001 From: Maledong Date: Wed, 17 Aug 2022 12:10:42 +0800 Subject: [PATCH 4/4] fix the link fix the link --- locale/en/docs/guides/diagnostics/live-debugging/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en/docs/guides/diagnostics/live-debugging/index.md b/locale/en/docs/guides/diagnostics/live-debugging/index.md index 3bbf0603b62f1..64726bf3398d5 100644 --- a/locale/en/docs/guides/diagnostics/live-debugging/index.md +++ b/locale/en/docs/guides/diagnostics/live-debugging/index.md @@ -28,4 +28,4 @@ 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/) +* [Using Inspector](/en/docs/guides/diagnostics/live-debugging/using-inspector)