I’m writing a script that read files in the same folder that contains the script itself. So the script starts with something like
let wfn_file_name = "WFN_co.h5", eqp_file_name = "eqp_co.dat", itrs_max = 1 wfn_fid = h5open(wfn_file_name) eqp_fid = open(eqp_file_name) #...
And now I want to debug it. The script is not in the root directory of the current VSCode workspace, which however is set to be the default working directory of Julia debugger in VSCode. Therefore the program fails (pause at exception) the time it reaches
Is there any way to tell the debugger to start in the folder that directly contains my script? Another solution is to let the program stop before
h5open and then I manually set the working directory using
cd in DEBUG CONSOLE.
Of course, I can change the
wfn_file_name etc. when debugging, but at the risk of forgetting to change them back after debugging; and it’s also very inconvenient.
I think that should be a quite common problem. What are your solutions when you face this simple but annoying issue?