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"
}
相关推荐
陈言必行1 天前
Unity 性能优化 之 编辑器创建资源优化( 工作流 | 场景 | 预制体)
unity·编辑器·游戏引擎
CAE虚拟与现实2 天前
VSCode中的下载VSIX是指什么?
ide·vscode·编辑器
路边闲人22 天前
vscode启用GEMINI CODE ASSIST插件
ide·vscode·gemini
小蕾Java2 天前
Java 开发工具,最新2025 IDEA使用(附详细教程)
java·ide·intellij-idea
CAE虚拟与现实2 天前
VSCode官方汉化包
ide·vscode·编辑器·vscode汉化
CAE虚拟与现实2 天前
VSCode创建Python项目和运行py文件
ide·vscode·编辑器
资讯第一线2 天前
《RAD Studio 13.0》 [DELPHI 13.0] [官方原版IOS] 下载
ide
过-眼-云-烟2 天前
新版Android Studio能打包但无法run ‘app‘,编译通过后手机中没有安装,顶部一直转圈
android·ide·android studio
Stardep2 天前
ssh远程连接服务器到vscode上“连接失败”
服务器·vscode·ssh
扯淡的闲人2 天前
多语言编码Agent解决方案(4)-Eclipse插件实现
java·ide·eclipse