Problems running Fortran in VS Code


I have an issue whilst trying to run Fortran on VS code. I have found several extension that compile and debug fortran code and offer language support, downloaded them and enabled them. However, when I write Fortran code and save it with the extension .f90 and then try to debu, I get a message saying I don’t have a fortran extension to debug. I click on download from market and I am led to an extension I already have. I don’t know how to solve this and I need to be able to run fortran for my research so I need your help.

Thank you in advance

Welcome to the Discourse!

Could you please be more specific as to Fortran extension you have installed? Operating system, VS Code version… Basically steps for us to be able to understand what is going on.

Fortran-lang develops and publishes the Modern Fortran extension for VS Code. If you are using that you shouldn’t need any other extension do write or debug Fortran code.

If you are trying to debug a single file you can do that with the press of a button on the top right somewhere. If you have a more complex project with multiple files you need to read the instructions on how to setup the debugger GitHub - fortran-lang/vscode-fortran-support: Fortran language support for Visual Studio Code