# Debugging Intel compiled code on Windows - Visual Studio Code

**URL:** <https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426>\
**Category:** Visual Studio Code\
**Created:** [September 29, 2022, 11:42am UTC](https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426 "2022-09-29T11:42:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [September 29, 2022, 11:42am UTC](https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426/1 "2022-09-29T11:42:05Z")

</div>

I am following up from an issue a VS Code user encountered a while back with Intel Fortran compilers on Windows and Debugging. Essentially, the problem faced was that there was no suitable Expression Evaluator for Intel compilers on Windows. Therefore, the Debug Adaptor `cppvsdbg` (closed-source and IP owned my Microsoft) is not capable of resolving the symbols from the object file.

This ultimately means that code compiled with Intel compilers cannot be debugged in VS Code on Windows.

I was wondering if someone from Intel could share some thoughts on this. Is Intel aware of this limitation? Would Intel consider implementing such feature for VS Code? Are there any workarounds you can suggest for your Windows users?

I think this is quite an important feature to have since:

- Intel compilers are now free to use, thus making it an excellent alternative for Windows users that don’t want to figure out how to install `gfortran`
- VS Code in Fortran already has a pretty big user base in our community see:

> [@Code Editors/IDEs used for Fortran](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139):
>
> With the [Modern Fortran VS Code extension coming to Fortran Lang](https://fortran-lang.discourse.group/t/modern-fortran-vs-code-extension-migrating-to-fortran-lang-on-github/3117) I was wondering what is the main editor people use in this community. Modern Fortran averages +7k new installs every month (which is different than downloads) so I was curious how that number fairs with the rest code editors and IDEs. It would be great if you could share this within your research groups, company teams, etc. to get some decent statistics. Please feel free to edit the poll to add your editor/IDE if it is not liste…

and

> [@Fortran Developer's Poll - 2022](https://fortran-lang.discourse.group/t/fortran-developers-poll-2022/3877):
>
> As a continuation of an older post about Code Editors used to write Fortran: [Code Editors/IDEs used for Fortran](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139). I thought it would be interesting to get some statistics about the OSs and processors people use to develop Fortran on/for, as well as the type of parallelism, if any, folks use. If the survey has a good turn out maybe it can become an annual poll to help us identify areas that are of high demand and are in need of support. Feel free to share this survey with your teams/research gro…

- Linting from `ifort`/`ifx` is already support in VS Code and Walkthroughs on how to setup the Intel compilers will be included in the future
- I don’t have any plans on writing a Visual Studio extension for Fortran to support the Language Server Protocol. So Windows users that want Fortran LSP support will either have to stick to VS2019, switch to VS Code and lose debugging capabilities or move to a different code editor for development with LSP and still use VS for debugging (maybe there is another solution that I am unaware off).

* * *

- C/C++ vscode extension issue: [Symbols are unavailable in some Intel Fortran code. · Issue #8479 · microsoft/vscode-cpptools · GitHub](https://github.com/microsoft/vscode-cpptools/issues/8479)
- Parent issue on Modern Fortran vscode extension: [Fortran variables are sometimes not accessible · Issue #310 · fortran-lang/vscode-fortran-support · GitHub](https://github.com/fortran-lang/vscode-fortran-support/issues/310)

* * *

PS If you would rather have this conversation in private, for whatever reason, please PM me or send me an email at [gnikit@duck.com](mailto:gnikit@duck.com)

---

<div class="post-metadata">

**Author:** ![zoziha](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/zoziha/32/582_2.png) [@zoziha](https://fortran-lang.discourse.group/u/zoziha)\
**Post date:** [September 29, 2022, 12:46pm UTC](https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426/2 "2022-09-29T12:46:10Z")

</div>

As far as I know, Intel has [its own distribution of gdb](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-gdb.html#gs.dfcxa5), which tends to be included in the OneAPI suite, and I used to use it to debug ifort code on Windows, it should work.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [September 29, 2022, 1:05pm UTC](https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426/3 "2022-09-29T13:05:32Z")

</div>

I don’t think the debug adapter for gdb (cppgdb) works on Windows. The only vscode adapter designed for Windows AFAIK is cppvsdbg. For everything else you have to rely on some Unix shell.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [November 5, 2022, 3:03pm UTC](https://fortran-lang.discourse.group/t/debugging-intel-compiled-code-on-windows-visual-studio-code/4426/4 "2022-11-05T15:03:38Z")

</div>

@greenrongreen Apologies if you are not the right person to ping for this, but could you pass this along to the appropriate team?

An increasing number of users has been posting about ifort/ifx and VS Code debugging on Windows, with the latest being [visual studio code - VSCode with Intel Fortran debugger: debugging window doesn't show allocatable variables - Stack Overflow](https://stackoverflow.com/questions/73143176/vscode-with-intel-fortran-debugger-debugging-window-doesnt-show-allocatable-va/74328818#74328818)
