实时调试
¥Live Debugging
在本文档中,你可以了解如何实时调试 Node.js 进程。
¥In this document you can learn about how to live debug a Node.js process.
我的应用没有按预期运行
¥My application doesn’t behave as expected
症状
¥Symptoms
用户可能会观察到应用没有为某些输入提供预期的输出,例如,HTTP 服务器返回 JSON 响应,其中某些字段为空。在此过程中,各种事情都可能出错,但在此用例中,我们主要关注应用逻辑及其正确性。
¥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
在此用例中,用户希望了解我们的应用针对特定触发器(例如传入的 HTTP 请求)执行的代码路径。它们可能还想逐步执行代码并控制执行,以及检查变量在内存中保存的值。
¥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.