【问题标题】:VSCode configuation issues - on Anaconda :: debugging-complaints from the systemVSCode 配置问题 - 在 Anaconda 上 :: 来自系统的调试投诉
【发布时间】:2021-05-20 15:59:27
【问题描述】:

在 Anaconda 上启动 VSCode 时,我遇到了一些问题。 注意:我在 Win 10 上运行 VsCode 1.52.1 - 在 Anaconda 中

在早期,我使用 platform.io 安装了 VSCode - 但这是很久以前的事了。现在我想执行一个 python 脚本——但这不起作用——我得到了下面的图像 图片

然后我选择了“打开 Launch.json” - 查看相应的图片:

但我不知道在这里做什么?!

/ / PIO Unified Debugger


//

// Documentation: https://docs.platformio.org/page/plus/debugging.html

// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html

{

    "version": "0.2.0",

    "configurations": [

        {

            "type": "platformio-debug",

            "request": "launch",

            "name": "PIO Debug",

            "executable": "c:/Users/tarifa/Documents/PlatformIO/Projects/ESP/.pio/build/esp32dev/firmware.elf",

            "projectEnvName": "esp32dev",

            "toolchainBinDir": "C:/Users/tarifa/.platformio/packages/toolchain-xtensa32/bin",

            "internalConsoleOptions": "openOnSessionStart",

            "preLaunchTask": {

                "type": "PlatformIO",

                "task": "Pre-Debug"

            }

        },

        {

            "type": "platformio-debug",

            "request": "launch",

            "name": "PIO Debug (skip Pre-Debug)",

            "executable": "c:/Users/tarifa/Documents/PlatformIO/Projects/ESP/.pio/build/esp32dev/firmware.elf",

            "projectEnvName": "esp32dev",

            "toolchainBinDir": "C:/Users/tarifa/.platformio/packages/toolchain-xtensa32/bin",

            "internalConsoleOptions": "openOnSessionStart"

        }

    ]

}

我想我必须对 VSCode 进行更多配置 顺便提一句。似乎是这样,我可以将 VScode 从版本 1.52.xy 更新/升级到更新版本!?

更新:

我根据 stevents 的提示编辑 - 现在我要测试了。

我仍然在设置问题 - 我想我必须跳过并扔掉所有 esp32 和所有其他微控制器 /platformio 的东西。它们会导致很多问题

【问题讨论】:

    标签: python visual-studio-code anaconda


    【解决方案1】:

    你需要注解preLaunchTask:

        "preLaunchTask": {
    
            "type": "PlatformIO",
    
            "task": "Pre-Debug"
    
        }
    

    【讨论】:

    • 你好,亲爱的史蒂文,非常感谢,我根据你的提示编辑了 - 现在我要测试了。
    • 根据 stevents 提示编辑 - 现在我要测试了。我仍然在设置上苦苦挣扎-我想我必须跳过并扔掉所有 esp32 和所有其他微控制器/platformio 的东西。它们会引起很多问题期待再次收到您的来信。-祝您有美好的一天
    • 很抱歉迟到了。事实上,我对你采取的配置并不熟悉。我只是采用正常配置来调试python。你可以在这里参考官方文档:code.visualstudio.com/docs/python/debugging。简而言之,单击“添加配置”按钮,然后选择 python 类别,然后选择项目的特定类型。非常抱歉再次迟到。
    • 嗨,史蒂文 - 非常感谢。我会按照建议去做并尝试一下。非常感谢你所做的一切!
    猜你喜欢
    • 2011-07-28
    • 1970-01-01
    • 2020-08-25
    • 2019-03-19
    • 2017-03-02
    • 1970-01-01
    • 1970-01-01
    • 2021-05-01
    • 1970-01-01
    相关资源
    最近更新 更多