首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >带有Intel调试器的VSCode :调试窗口不显示可分配的变量

带有Intel调试器的VSCode :调试窗口不显示可分配的变量
EN

Stack Overflow用户
提问于 2022-07-27 18:47:47
回答 1查看 187关注 0票数 1

我试图在Windows上使用VSCode和来调试fortran代码。我的问题是,我无法在VARIABLES窗口的Run and Debug选项卡中看到可分配变量的值。

VARIABLES窗口显示不可分配变量的值,但在可分配变量名称旁边显示An unspecified error has occurred

我不确定这是否有帮助,但我添加了用于编译和调试代码的tasks.jsonlaunch.json

  • .vscode/tasks.json

代码语言:javascript
运行
复制
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build using intel fortran",
            "type": "shell",
            "options": {
                "cwd": "${workspaceRoot}",
                "env": {
                    "PATH": (copied and pasted PATH from echo %PATH% on Intel oneAPI command prompt for Intel 64 for Visual Studio2022) 
                    "LIB": (copy and pasted LIB from echo %LIB% on Intel oneAPI command prompt for Intel 64 for Visual Studio2022)
                    "INCLUDE":  (copy and pasted INCLUDE from echo %INCLUDE% on Intel oneAPI command prompt for Intel 64 for Visual Studio2022)
                },
                "shell": {
                    "executable": "${env:windir}\\system32\\cmd.exe",
                    "args": [
                        "/d",
                        "/c"
                    ]
                }
            },
            "command": "ifort.exe",
            "args": [
                "/debug:full",
                "/o",
                "${workspaceFolder}\\a_intel.exe",
                "interface.f90",
                "invert.f90",
                "pvgauss.f90",
                "main.f90"
            ],
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": true,
                "panel": "shared",
                "showReuseMessage": true,
                "clear": false
            },
            "problemMatcher": []
        }
    ]
}

  • .vscode/launch.json

代码语言:javascript
运行
复制
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/a_intel.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [
                {
                    "name": "config",
                    "value": "Debug"
                }
            ],
            "console": "integratedTerminal"
        }
    ]
}
EN

回答 1

Stack Overflow用户

发布于 2022-11-05 14:59:23

恐怕您遇到了微软开发的Windows cppvsdbg的限制。我们没有任何控制的根本问题,英特尔将不得不采取行动,并提供一个调试适配器的Windows。

有关这个问题的更多信息,您可以阅读以下GitHub问题:https://github.com/fortran-lang/vscode-fortran-support/issues/310

您还可以在Fortran中跟踪这个线程以获得任何更新:https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426

作为解决办法,您可以在VS代码中使用WSL和Intel的GDB调试器和cppgdb调试适配器。

我是现代Fortran for VS代码的作者之一

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73143176

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档