首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >NextJS VSCode Typescript ==>断点未绑定

NextJS VSCode Typescript ==>断点未绑定
EN

Stack Overflow用户
提问于 2020-07-02 14:43:01
回答 2查看 3.7K关注 0票数 14

我遵循本文档中的Next.js说明:https://nextjs.org/docs/advanced-features/debugging#using-the-debugger-in-visual-studio-code

尝试调试我的Next.js项目。进程启动,调试器正确连接,并显示调试的日志消息。然而,当我设置一个断点时,它仍然是褪色的,当我悬停它时,VSCode会显示“未绑定的断点”。更不用说,调试器不会在断点处停止。

但是,如果我使用关键字" debugger“,那么调试器会在我使用它的地方停止。

我的系统:

"next": "9.4.4",

tsconfig.json:

代码语言:javascript
运行
复制
{
  "compilerOptions": {
    "downlevelIteration": true,
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "sourceMap": true,
    "allowJs": true,
    "skipLibCheck": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "noEmit": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "allowUnreachableCode": false,
    "jsx": "preserve",
    "baseUrl": ".",
    "paths": {
      "types/": [
        "src/types/index"
      ],
      "types/*": [
        "src/types/*",
        "src/types/index"
      ],
      "data/*": [
        "src/data/*"
      ],
    },
  },
  "exclude": [
    "node_modules"
  ],
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx",
    "next.config.js"
  ],
  "compileOnSave": true
}
EN

Stack Overflow用户

发布于 2021-04-18 11:20:26

您可能应该先标记断点,然后再启动调试器

票数 1
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62690455

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档