在对 Node.js REST API 进行 API 调用时,如何查看它使用的代码部分?

When making an API call to a Node.js REST API, how can I view which portion of the code it uses?

我有一个用 Node.js 和 Express.js 构建的 REST API。进行 API 调用时,如何查看它使用的代码的哪一部分? (无需我自己通过阅读代码来推断)

Reddit 用户 BehindTheMath pointed me 以下两个选项:日志记录和断点。

Console logging can work, but you'd need to add logging all over the app. Another option is to debug the app, and put breakpoints and see where it stops.