【问题标题】:global evaluation is not supported on Vscode when use shift+r flutter使用 shift+r 颤振时,Vscode 不支持全局评估
【发布时间】:2019-08-05 23:16:13
【问题描述】:

当我在调试控制台上使用热重载时,它显示“不支持全局评估”。我该如何解决这个问题?

在我阅读此global evaluation 之前,它对我没有帮助

这是我problem的头像

【问题讨论】:

  • 您可以尝试直接在命令行上运行flutter run 看看是否有效吗?并确保在运行 flutter doctor -v 时不会收到任何警告或错误...

标签: dart visual-studio-code flutter vscode-debugger


【解决方案1】:

在launch.json中添加配置"console":"terminal"

示例:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "dart_application_1",
            "request": "launch",
            "type": "dart",
            "program": "bin/dart_application_1.dart",
            "console": "terminal"
        }
    ]
}

更多详情here

【讨论】:

  • 嗨,在从命令面板生成 Dart(2.12.0-141.0.dev) 模板“SimpleConsoleApplication”时,没有在 dart 工具中创建 launch.json 文件(仅创建 package_config.json) .您使用的是哪个模板?谢谢。
【解决方案2】:

Dart/Flutter 的 VS 代码调试器目前不支持全局评估(here 存在一个未解决的问题)。如果您想看到该问题,请在该问题上添加 ?。

调试控制台可用于在执行暂停时进行评估(例如,您已在断点处停止或类似情况) - 这是当前帧上下文中的评估。

【讨论】:

    猜你喜欢
    • 2018-11-06
    • 1970-01-01
    • 2021-08-11
    • 2020-01-20
    • 2022-07-16
    • 2019-06-09
    • 1970-01-01
    • 2020-02-10
    • 2021-07-12
    相关资源
    最近更新 更多