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"
}
相关推荐
田野与天7 小时前
jupyter 文件浏览器,加强版,超好用,免费exe
ide·python·jupyter
张小凡vip9 小时前
pycharm已有python3.7,如何新增Run Configurations中的Python interpreter为python 3.9
ide·python·pycharm
小白鼠零号9 小时前
记录 | Pycharm中如何调用Anaconda的虚拟环境
ide·python·pycharm
打工人你好13 小时前
Visual Studio Code 在.S汇编文件中添加调试断点及功能简介
汇编·ide·vscode
叶羽西13 小时前
Windows VsCode Terminal窗口使用Linux命令
ide·vscode·编辑器
夜月yeyue13 小时前
VScode+OpenOCD+HTOS栈回溯在国产mcu芯片上完全调试
c语言·ide·vscode·单片机·嵌入式硬件·编辑器
James. 常德 student17 小时前
Markdown 编辑器的使用
编辑器
weixin_7488770017 小时前
【Node.js中的错误处理:策略与最佳实践】
node.js·编辑器·vim
YiSLWLL18 小时前
Tauri 2.3.1+Leptos 0.7.8开发桌面应用--Sqlite数据库的写入、展示和选择删除
数据库·vscode·rust·sqlite·sqlx
软件开发-NETKF888819 小时前
idea报错java: 非法字符: ‘\ufeff‘解决方案
java·ide·intellij-idea