【问题标题】:NestJs not working with VScode auto-attachNestJs 不使用 VScode 自动附加
【发布时间】:2020-08-18 20:49:41
【问题描述】:

我想将 VScode auto-attachNestJs 一起使用,但它没有按预期工作。

当启用auto-attach 并运行npm run start:debug 时,我收到以下错误:

Cannot connect to runtime; make sure that runtime is in 'legacy' debug mode.

【问题讨论】:

  • 我也见过这个。但是尽管如此,调试对我有用,并且所有调试点都会受到影响。所以我暂时忽略它。但这很烦人,我也想摆脱它

标签: debugging visual-studio-code nestjs


【解决方案1】:

这不是NestJSVScode 问题。

问题是该项目在 devcontainer (docker) 中运行。设置在主机上运行的环境后,我得到了与 Derryl Thomas 评论相同的行为。

我仍然不知道为什么这只发生在devcontainer 内部(使用ts-node 进行调试有效),但由于与devcontainer 有关的外部问题,我将退后一步,不再使用devcontainer

【讨论】:

    猜你喜欢
    • 2018-10-15
    • 2020-10-15
    • 2021-12-02
    • 2019-04-30
    • 2020-02-28
    • 1970-01-01
    • 2022-11-10
    • 2021-08-03
    • 2019-12-27
    相关资源
    最近更新 更多