I am using VScode (the most recent version) and Gfortran (12.2.0), on Windows 11, to learn Fortran 90-2008. I have installed the extensions “Modern Fortran”, “Code Runner”, and “C/C++”, so I can compile and run my .f90 program easily with a single click, and all works fine.
However, I cannot find WHERE to declare compiler options, like “-fcheck=all -g -O0 -fbacktrace” on the extensions’ configurations, so when I click on “Run code” (on VScode), it would compile with those options by default. Could you guys help me? Thanks in advance!
Welcome to the Discourse @steelclam.
If you are using the Modern Fortran pre-release version you don’t need Code runners to compile, run and/or debug individual Fortran files.
Open the vscode settings and add your options, to fortran.linter.extraArgs like this