使用检查器
¥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