tubo nextjs vscode 断点未命中服务器

问题描述 投票:0回答:1

当我在 nextjs 文档中运行调试配置时,Turbo nextjs 断点没有被命中。

visual-studio-code turbo next
1个回答
0
投票

最终起作用的是:

将此添加到我的

package.json

    "dev": "NODE_OPTIONS=\"--inspect=9234\" next dev",
pnpm dev

然后服务器启动并发送此消息:

- info the --inspect option was detected, the Next.js server for pages should be inspected at port 9236.

然后我使用指定的端口号将其添加到我的

launch.json

    {
      "type": "node",
      "request": "attach",
      "name": "Attach Backend 4",
      "address": "localhost",
      "sourceMaps": true,
      "port": 9236
    },

然后我运行了配置并且它起作用了。

© www.soinside.com 2019 - 2024. All rights reserved.