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..64726bf3398d5 --- /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..beccef8223e3a --- /dev/null +++ b/locale/en/docs/guides/diagnostics/live-debugging/using-inspector.md @@ -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/