vscode借助插件调试OpenFoam的正确的.vscode配置文件

正确的备份文件位置:

/home/jie/桌面/理解openfoam/正确的调试爆轰单进程案例/mydebugblastFoam

调试爆轰案例流体

并且工作区和用户区都是openfoam-7版本

问题:F5以debug模式启动后不停在断点

解决方法:

这里备份一下.vsode正确的配置,不然错误的配置会F5以debug模式启动后不停在断点

.vscode中的五个文件如下所示(可以正确启动调试):

{
  "configurations": [
    {
      "name": "Linux",
      "includePath": [
        "/home/jie/myapp/OpenFOAM-7/blastfoam_2_0/src/compressibleSystem/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/blastfoam_2_0/src/timeIntegrators/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/src/OSspecific/POSIX/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/src/OpenFOAM/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/src/dynamicFvMesh/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/src/finiteVolume/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/src/meshTools/lnInclude",
        "/home/jie/myapp/OpenFOAM-7/src/*/lnInclude",
        "./**"
      ],
      "defines": [],
      "compilerPath": "/usr/bin/gcc",
      "cStandard": "gnu11",
      "cppStandard": "gnu++14",
      "intelliSenseMode": "gcc-x64"
    }
  ],
  "version": 4
}

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "ofextension: debug solver",
      "type": "cppdbg",
      "request": "launch",
      "program": "/home/jie/OpenFOAM/jie-7/platforms/linux64GccDPInt32Opt/bin/mydebugblastFoam2",
      "args": [ "-case", "Fluid/"],
      "stopAtEntry": true,
      "cwd": "/home/jie/桌面/2.4.0成功/true.bak/5c4_Z_change2_right3_singleProcess/",
      "environment": [],
      "externalConsole": false,
      "MIMode": "gdb",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ],
      "preLaunchTask": "ofextension: debug solver",
      "miDebuggerPath": "${workspaceFolder}/.vscode/of-gdb.sh"
    }
  ]
}

#!/bin/bash
. /home/jie/myapp/OpenFOAM-7//etc/bashrc WM_NCOMPROCS=2; export WM_COMPILE_OPTION=Debug
/usr/bin/gdb "$@"

{
    "files.associations": {
        "blastFoam.C": "cpp"
    }
}

{
  "tasks": [
    {
      "type": "shell",
      "label": "ofextension: build solver",
      "command": [
        "cd ${workspaceFolder};",
        "source /home/jie/myapp/OpenFOAM-7//etc/bashrc WM_NCOMPROCS=2;",
        "wmake 2>&1 | tee log.wmake_opt"
      ],
      "args": [],
      "options": {},
      "problemMatcher": [],
      "group": {
        "kind": "build",
        "isDefault": true
      }
    },
    {
      "type": "shell",
      "label": "ofextension: debug solver",
      "command": [
        "cd ${workspaceFolder};",
        "source /home/jie/myapp/OpenFOAM-7//etc/bashrc WM_NCOMPROCS=2; export WM_COMPILE_OPTION=Debug;",
        "wmake 2>&1 | tee log.wmake_debug"
      ],
      "args": [],
      "options": {},
      "problemMatcher": []
    }
  ],
  "version": "2.0.0"
}
相关推荐
微网天下3 小时前
Mac Goland dlv 升级
ide·golang·bug·mac·brew
开发者联盟league3 小时前
eclipse rcp-创建rcp-创建target
java·ide·eclipse
羊小猪~~3 小时前
前端入门之VUE--vue脚手架编程
前端·javascript·css·vue.js·vscode·html·状态模式
多方通行84 小时前
关于Ubuntu的server版本登录无法输入password问题
linux·开发语言·ubuntu·编辑器·bug
小白也有IT梦4 小时前
在Jupyter Notebook/Lab 中探索 Python 类和对象的有效方法
ide·python·jupyter
ASEpochs4 小时前
jupyter或者python文件导入其他python文件模块中方法路径问题
ide·python·jupyter
charlie1145141915 小时前
嵌入式Linux应用层开发——调试专篇(关于使用GDB调试远程下位机开发板的应用层程序办法 + VSCode更好的界面调试体验提升)
linux·c语言·开发语言·vscode·imx6ull·嵌入式linux·调试技术
万木春❀5 小时前
VScode、Windsurf、Cursor 中 R 语言相关快捷键设置
ide·vscode·r语言
花开花落的个人博客5 小时前
Windows系统VSCode 搭建ESP-IDF环境
ide·vscode·编辑器
leaf_leaves_leaf5 小时前
WSL中不同版本Ubuntu与本机VScode联合使用
linux·vscode·ubuntu