zoukankan      html  css  js  c++  java
  • Visual Studio Code同时debug多种代码的方式

    今天看了一下,猜应该是configurations里面多写一个就行,试了下,真的可以同时debug PythonGo代码。

    可以打断点、单步执行PythonGo代码。

    launch.json 如下

    {
        // 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": "Python: 当前文件",
                "type": "python",
                "request": "launch",
                "program": "${file}",
                "console": "integratedTerminal"
            },
            {
                "name": "Go: 当前文件",
                "type": "go",
                "request": "launch",
                "program": "${file}",
                "mode": "auto"
                
            }
        ]
    }

     然后在DEBUG后面选择用哪一个配置跑就行了。

    只是还有两点觉得做得不太好的地方,

    一是 watch里面不会显示nil值,而是显示类型。

    二是 不知道是否因为加了watch,两个变量都会在未初始化的时候报错,感觉像IDE的bug。

    Failed to eval expression: { "Expr": "f2", "Scope": { "goroutineID": 1, "frame": 0 }, "Cfg": { "followPointers": true, "maxVariableRecurse": 1, "maxStringLen": 64, "maxArrayValues": 64, "maxStructFields": -1 } } Eval error: could not find symbol value for f2

    Failed to eval expression: { "Expr": "f", "Scope": { "goroutineID": 1, "frame": 0 }, "Cfg": { "followPointers": true, "maxVariableRecurse": 1, "maxStringLen": 64, "maxArrayValues": 64, "maxStructFields": -1 } } Eval error: could not find symbol value for f

     

  • 相关阅读:
    LGPrep的一点小问题
    百度地图API的事件处理:覆盖物阻止冒泡
    HTML5截取视频第一帧作为预览图片
    20165105 第二周学习总结
    20165105课下作业
    20165105第一周学习查缺补漏
    第四周课下作业20165105
    20165105 201620172 《Java程序设计》第1周学习总结
    我期望的师生关系
    .NET使用NPOI组件将数据导出Excel
  • 原文地址:https://www.cnblogs.com/lionfight/p/10964963.html
Copyright © 2011-2022 走看看