Last active
May 3, 2025 05:14
-
-
Save yuxuan-z19/4d86652d55a9b8e962939fda670fe698 to your computer and use it in GitHub Desktop.
VSCode debugger configs for Modern Fortran
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .vscode/launch.json | |
{ | |
"configurations": [ | |
{ | |
"name": "Fortran: gfortran build and debug active file", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${fileDirname}/${fileBasenameNoExtension}", | |
"args": [], | |
"stopAtEntry": false, | |
"cwd": "${fileDirname}", | |
"environment": [], | |
"externalConsole": false, | |
"preLaunchTask": "Fortran: gfortran build active file", | |
"MIMode": "gdb", | |
"setupCommands": [ | |
{ | |
"description": "Enable pretty-printing for gdb", | |
"text": "-enable-pretty-printing", | |
"ignoreFailures": true | |
} | |
] | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .vscode/tasks.json | |
{ | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "Fortran: gfortran build active file", | |
"command": "/usr/bin/gfortran", | |
"args": [ | |
"-fdiagnostics-color=always", | |
"-g", | |
"${file}", | |
"-o", | |
"${fileDirname}/${fileBasenameNoExtension}" | |
], | |
"options": { | |
"cwd": "${fileDirname}" | |
}, | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
}, | |
"detail": "Task generated by Debugger" | |
} | |
], | |
"version": "2.0.0" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those who are new to the VSCode debugger, please take a look at the comment