# Visual studio code vs visual studio

**URL:** <https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711>\
**Category:** Uncategorized\
**Created:** [October 30, 2023, 9:32pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711 "2023-10-30T21:32:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aledinola](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aledinola](https://fortran-lang.discourse.group/u/aledinola)\
**Post date:** [October 30, 2023, 9:32pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/1 "2023-10-30T21:32:42Z")

</div>

I am a Windows user and I use intel one api fortran with visual studio integration. Is there any advantage to using visual studio code instead of visual studio as IDE? I have seen that VSC is very popular among Fortran users but I have found it quite cumbersome to make it work in Fortran (especially to do interactive debugging). Does VSC offer extra functiinality that VS does not provide?

Any comments/feedback greatly appreciated!

---

<div class="post-metadata">

**Author:** ![hkvzjal](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/hkvzjal/32/3055_2.png) [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Post date:** [October 30, 2023, 9:46pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/2 "2023-10-30T21:46:04Z")

</div>

I’m in exactly the same situation, and right now, the big advantage of Visual Studio vs VSCode is, as you mention, the debugging capabilities with intel compilers.

On the other side, VSCode offers the use of the Moder Fortran pluging which is wonderful to navigate through the source code with ease. Also, WSL integration in VSCode is as easy as it can get, so if you need to do cross-platform and cross-compilers compilation/verification. VSCode is your best friend. MVS2022 has an easier integration to WSL compared to the previous versions but it is still kind of cumbersome compared to VSCode.

Oh, I forgot a big one, MSV(all versions) has an annoying lag the moment you work on a file with more that 1400 lines (+/- 100). Which for some reason in C++ you don’t see… and this alone has made many people want to drop Fortran.

---

<div class="post-metadata">

**Author:** ![devorah](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/devorah/32/5094_2.png) [@devorah](https://fortran-lang.discourse.group/u/devorah)\
**Post date:** [November 3, 2023, 8:29pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/3 "2023-11-03T20:29:49Z")

</div>

> [@hkvzjal](#):
>
> Oh, I forgot a big one, MSV(all versions) has an annoying lag the moment you work on a file with more that 1400 lines (+/- 100). Which for some reason in C++ you don’t see… and this alone has made many people want to drop Fortran.

@hkvzjal we have tested sample Fortran file with 1400 line and didn’t observe the lag.  
Please attached the entire VS solution test case for us at Intel to test and investigate a ‘lag’ if any.

---

<div class="post-metadata">

**Author:** ![hkvzjal](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/hkvzjal/32/3055_2.png) [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Post date:** [November 3, 2023, 8:48pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/4 "2023-11-03T20:48:37Z")

</div>

Hi @devorah I can’t share here the VS project as it is a proprietary closed-source project with many Gbs worth of source code … Let me correct my lack of precision: A newly generated project will respond just fine, the issue is that, as one compiles and recompiles, create new functions, the “Browse.VC.db” database gets bigger and bigger. This makes sense, but quite fast I’m obliged to destroy the database by hand or destroy and regenerate the project in order to regain fluidity when editing large files. We have not observed that with C++ having also \>thousands worth lines of code.

This issue is not new:

> **[Very slow editor response in Visual Studio](https://community.intel.com/t5/Intel-Fortran-Compiler/Very-slow-editor-response-in-Visual-Studio/td-p/1063908)**
>
> Hello, I'm getting very slow response in the visual studio editor, key presses can take up to 2 seconds to appear on the screen. My other applications seem to be responding normally. It seemed to get slower with time, so I checked system...

> **[Slow editor response](https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-editor-response/td-p/1360712)**
>
> Quite often the Visual Studio editor response slows down due to Fortran Integration --- Compile 19.0 update 5 (package 281) with VS2019. Eventually (sometimes) there is a pop-up (from the VS), indicating one of the extensions (Fortran IDE) is slowing...

> <https://stackoverflow.com/questions/52278955/community-studio-2017-lagging-with-long-fortran-code>

I was working with MVS2019 until recently, now I’m testing MVS2022 17.4.5 to see if the issue has improved. If I reproduce it again I’ll create a ticket under intel’s platform.

---

<div class="post-metadata">

**Author:** ![jacobwilliams](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jacobwilliams/32/10_2.png) [@jacobwilliams](https://fortran-lang.discourse.group/u/jacobwilliams)\
**Post date:** [November 3, 2023, 10:34pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/5 "2023-11-03T22:34:14Z")

</div>

The Visual Studio integrations with the Intel Fortran compiler are just terrible and have been for years. It should embarrass Intel, but they don’t seem to care. Visual Studio Code with the Modern Fortran extension is better in every possible way (and cross platform).

The only thing I use Visual Studio for now is to click the “compile” button, and to use the Intel debugger (which is great, and not available in VSCode). Otherwise, all my editing is done in VSCode.

---

<div class="post-metadata">

**Author:** ![devorah](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/devorah/32/5094_2.png) [@devorah](https://fortran-lang.discourse.group/u/devorah)\
**Post date:** [November 6, 2023, 6:39pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/6 "2023-11-06T18:39:15Z")

</div>

Yes, all the abovementioned cases are with older, some no longer supported versions of VS.  
I would like to see if VS 2022 editing experience is improved, the same or worse. I also would like to have a sample VS solution and exact steps to reproduce the slow editing issue reported here.

---

<div class="post-metadata">

**Author:** ![aledinola](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aledinola](https://fortran-lang.discourse.group/u/aledinola)\
**Post date:** [November 6, 2023, 9:21pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/7 "2023-11-06T21:21:25Z")

</div>

Regarding the debugger, I also like the Intel debugger, is great. I tried to make a debugger work in VScode but I didn’t manage.

It would be extremely useful if someone could post a step-by-step guide on how to install VScode with a Fortran compiler (ifort or gfortran), have the modern fortran extension and a tool for setting breakpoints, etc.

I think VScode and Modern Fortran are great but in order to use them properly one has to suffer a high learning cost (and I consider myself a relatively experienced Fortran programmer). It would make sense to invest into “easing” the learning curve for Fortran users who are not computer scientists

---

<div class="post-metadata">

**Author:** ![sebastiandyrda](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@sebastiandyrda](https://fortran-lang.discourse.group/u/sebastiandyrda)\
**Post date:** [November 6, 2023, 9:53pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/10 "2023-11-06T21:53:54Z")

</div>

I second that. I also tried to install debugging tools into VScode unsuccessfully.

---

<div class="post-metadata">

**Author:** ![ludnic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@ludnic](https://fortran-lang.discourse.group/u/ludnic)\
**Post date:** [November 6, 2023, 10:00pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/11 "2023-11-06T22:00:04Z")

</div>

I got started with this video tutorial on debugging Fortran with VScode:

[![](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/3/397f64234b341b84111f0e44a754b060c0e9659e.jpeg "VS Code for Fortran Ep.4: Debugging") ](https://www.youtube.com/watch?v=XuNjA230e3k)

It turned up to be quite straightforward, at least on Linux.

---

<div class="post-metadata">

**Author:** ![epagone](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/epagone/32/252_2.png) [@epagone](https://fortran-lang.discourse.group/u/epagone)\
**Post date:** [November 6, 2023, 10:39pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/12 "2023-11-06T22:39:22Z")

</div>

This is useful but it would be interesting to see how to debug using fpm instead of a Makefile. Probably not too many changes are required in the configuration.

---

<div class="post-metadata">

**Author:** ![ludnic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@ludnic](https://fortran-lang.discourse.group/u/ludnic)\
**Post date:** [November 6, 2023, 11:39pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/13 "2023-11-06T23:39:55Z")

</div>

I usually have a build script that I call instead of make in the tasks.json. my build script does an fpm install and then in the launch.json I run the “installed” executable.

I’ll try to share an example of my setup in the next days.

---

<div class="post-metadata">

**Author:** ![jacobwilliams](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jacobwilliams/32/10_2.png) [@jacobwilliams](https://fortran-lang.discourse.group/u/jacobwilliams)\
**Post date:** [November 6, 2023, 11:44pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/14 "2023-11-06T23:44:33Z")

</div>

My understanding is that using the Intel debugger on Windows in VScode is not possible. We’ve been told in the past that the debugger is sort of a hack of the Visual Studio debugger and isn’t available in any kind of standalone way for use in other IDEs. Someone please correct me if I’m wrong.

---

<div class="post-metadata">

**Author:** ![NormanKirkby](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/normankirkby/32/1091_2.png) [@NormanKirkby](https://fortran-lang.discourse.group/u/NormanKirkby)\
**Post date:** [November 7, 2023, 10:26am UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/15 "2023-11-07T10:26:00Z")

</div>

I have just discovered an extension for Visual Studio which allows the user to open the currently open file in VS Code as well. This seems to me to be really useful especially if I ever manage to get fortls working! I have been using Visual Studio for so long that I am finding the migration to VS code quite difficult, especially at the level of project and solution management, and, as others have mentioned, debugging.

---

<div class="post-metadata">

**Author:** ![aledinola](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aledinola](https://fortran-lang.discourse.group/u/aledinola)\
**Post date:** [November 7, 2023, 10:42am UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/16 "2023-11-07T10:42:37Z")

</div>

@NormanKirkby thanks for sharing this tip! The extension of VS you refer to is available in which version of VS? I have the 2019 version

---

<div class="post-metadata">

**Author:** ![ludnic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@ludnic](https://fortran-lang.discourse.group/u/ludnic)\
**Post date:** [November 7, 2023, 10:04pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/17 "2023-11-07T22:04:35Z")

</div>

I’ve added an example of dev environment setup for a toy project I already had on GitHub here: [GitHub - ludnic/command-pattern](https://github.com/ludnic/command-pattern)

The project itself was a very simplistic task implemented in an overly complex way (for the nature of the task) so it’s not a good example for debugging but it serves the demo purpose.

There 2 things that are nicely integrated with vscode I think: one is sharing a containerised development environment that should make reproducing software setup very straightforward. The second is what I mentioned above about the way of building with fpm and running the debugger as in the YouTube video by Lukas Lamm.

---

<div class="post-metadata">

**Author:** ![NormanKirkby](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/normankirkby/32/1091_2.png) [@NormanKirkby](https://fortran-lang.discourse.group/u/NormanKirkby)\
**Post date:** [November 8, 2023, 10:01am UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/18 "2023-11-08T10:01:52Z")

</div>

It may not be available for VS2019. I am using v17. 7.6  
“Open in Visual Studio Code” v1. 4.58 dated 26/10/2023, see also github OpenInVsCode.  
Good luck  
Post your experiences, other may find it useful too!

---

<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 8, 2023, 10:45pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/19 "2023-11-08T22:45:02Z")

</div>

Hey guys, I am one of the authors of the vscode extension. I would say that the changes between the 2 are numerous and so cumbersome to enumerate, so I think I will skip that for now.

What I would suggest to keep this discussion constructive is to go to our GitHub repo ([GitHub - fortran-lang/vscode-fortran-support: Fortran language support for Visual Studio Code](https://github.com/fortran-lang/vscode-fortran-support)) and scroll through the existing issues and see if you have any ideas on how to improve things (feature wise). You also file new Issues features/bugs just please make sure to not spam us with duplicates or questions (questions can be posted on Discourse with the help vscode tag).

To be clear I _don’t expect anyone_ here to contribute code to resolve any of the existing Issues, but if you really want to donate your time I would be more than glad to onboard you in the project, discuss solutions and review your code.

As I mentioned earlier this week in another post here on Discourse

> [@"Had trouble installing fortls, please install manually" . How to install manually without pip?](https://fortran-lang.discourse.group/t/had-trouble-installing-fortls-please-install-manually-how-to-install-manually-without-pip/6721/9):
>
> Pip is the python package manager included in all supported python installations; it’s a command line tool. We can’t move away from Python (i.e. download an executable) what we can do is fix the user experience and make it to “just work” for the majority of our users. The breakdown of the problem in Windows is: python and hence pip might not be reachable via PATH the folder in which pip installs applications is not by default reachable by PATH if not in PATH VSCode cannot find the applicatio…

There is already a half-finished Pull-Request on GitHub that would dramatically improve Python integration with Modern Fortran, especially on Windows

> <https://github.com/fortran-lang/vscode-fortran-support/pull/824>
>
> This PR should add support to allow for the discovery of:
> \- packages installed …in virtual environments
> \- packages installed in Python environments that are not in the PATH
> \- Python environments setup as default \`ms-python.python\`
> 
> \## TODO:
> \- Update description
> \- Assign Issues
> \- Add tests

* * *

If you feel like helping by brainstorming please be respectful, concise, look through existing and closed Issues and provide good descriptions your requests.

---

<div class="post-metadata">

**Author:** ![hkvzjal](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/hkvzjal/32/3055_2.png) [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Post date:** [November 30, 2023, 8:01am UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/20 "2023-11-30T08:01:01Z")

</div>

Has anyone here tried out using Intel GDB with Visual Studio Code integration with the " **Extension Pack for Intel® oneAPI Toolkits**"?  
[https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-gdb.html](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-gdb.html)  
[https://www.intel.com/content/www/us/en/docs/oneapi-base-toolkit/get-started-guide-linux/2024-0/run-a-sample-project-with-vscode.html](https://www.intel.com/content/www/us/en/docs/oneapi-base-toolkit/get-started-guide-linux/2024-0/run-a-sample-project-with-vscode.html)

Maybe this could be used together with the Modern Fortran plugin?

---

<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 30, 2023, 9:38am UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/21 "2023-11-30T09:38:30Z")

</div>

Yes, I have successfully under Linux (and in the past with MacOS, although not the case anymore). You just need to point in the launch.json file to the Intel GDB.

In Windows however that’s not possible, (last I checked which was a while back). The debug adaptor we inherit by the C/C++ vscode extension does not work with intel compilers.

---

<div class="post-metadata">

**Author:** ![devorah](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/devorah/32/5094_2.png) [@devorah](https://fortran-lang.discourse.group/u/devorah)\
**Post date:** [November 30, 2023, 7:52pm UTC](https://fortran-lang.discourse.group/t/visual-studio-code-vs-visual-studio/6711/22 "2023-11-30T19:52:09Z")

</div>

The issue with slow editor response reported here and on Intel Fortran Forum is fixed in the next 2024.1 Intel HPC Toolkit release.  
Please note, the fix is based on the test case provided [here](https://community.intel.com/t5/Intel-Fortran-Compiler/Slow-editor-response/m-p/1541463/highlight/true#M169037)  
If your case is different from the above please submit it here and tag me. Thank you.
