Replies: 2 comments 1 reply
-
I am also using vscode (I think vscode and fpm work well together). When debugging, it is troublesome to find the correct executable program path. Maybe we can find a way. I usually look up the executable program generation location patiently based on the running information of fpm (it seems that the location information contains a hash value), and then manually paste it into Digression (not important at this stage): I see that vscode has official plug-ins for languages such as julia and python. I wonder if the fortran community specifically wants to promote Fortran programming in vscode? fpm test tester --runner ls |
Beta Was this translation helpful? Give feedback.
-
Hello, @bitli : I am also a user of fpm [options] <test_name> --runner vdb
fpm [options] <test_name> --runner vdb - ARGS
vdb clean # Remove and backup JSON::launch.json Note: Because some file processing commands are used, such as Link |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have successfully used vscode tasks and launcher to compile, launch and debug main programs from vscode and fpm. The difficulty was to find the location of the program to launch created in a generated directory as
build/gfortran_2A42023B310FA28D/bin
. The workaround was to create awork
directory somewhere and usefpm install --prefix .../work
instead offpm build
, so the binaries are at a predictable location. Then thelaunch.json
can specify"program": "work/main"
for the debugger and all works fine.However when developing a library module I must test using programs in the test or example directories and I did not find a way to automatically copy the files to the work directory. May be a shell script could be called after the build task, but this is not very convenient especially in a multi-architecture project. I tried to use the command
fpm test --runner gdb
, but then the debug interface of vscode try to connect to fpm, not to the started gdb (or other strange things happens).Any idea of what could be done ?
Ideally I would like to install the examples or test in a specific location, just like
fpm install
or build the project in a fixed directory or get the location of the build directory (this is less convenient).Beta Was this translation helpful? Give feedback.
All reactions