如何在 PhpStorm 上配置 JS/TS 调试器,就像在 VSCode 上一样使用附加选项?

How to configure JS/TS debugger on PhpStorm like on VSCode with attach option?

我正从 VSCode 迁移到 PhpStorm。在 VSCode 中,我可以使用附加模式配置调试器。 什么是附加模式?它允许您在现有浏览器 window 中调试您的应用程序。在启动模式下,浏览器的新实例启动。 在 PhpStorm 中,我在文档中看不到该选项。我是否以错误的方式搜索?或者有什么技巧可以做到这一点?

感谢您的回复。

您可以使用 Attach to Node.js/Chrome run configuration to attach the debugger to a running Node.js process/Chrome browser started with --remote-debugging-port option. See https://www.jetbrains.com/help/phpstorm/2021.3/running-and-debugging-node-js.html#node_debugging_running_application 了解更多信息。