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

     

  • 相关阅读:
    如何理解对象、属性、方法?
    添加超链接,请始终将正斜杠添加到子文件夹
    什么导致table不稳固?
    HTML css和js浏览器兼容问题
    理解前端数据双向绑定原理——Object.defineProperty()
    Js事件传播流程
    移动端开发项目注意事项
    get与post的区别
    Web 页面性能优化与SEO优化
    我的WCF项目系列之二WCF初级应用
  • 原文地址:https://www.cnblogs.com/lionfight/p/10964963.html
Copyright © 2011-2022 走看看