Hi, I’m trying to run my module’s test line-by-line in vscode (as I used to when I had all my code in 1 file), so I can experiment with the REPL, and see the results of plots.
(BTW I verified that these tests run with ] test.)
But I bump into 2 problems:
on the first line, using RayTracingWeekend, I get an ArgumentError: Package RayTracingWeekend not found in current path. I’m not sure how to best fix this issue, i.e. allow using the parent module.
When I try to run a single line within a test, using Shift-Enter, it runs the whole test. CTRL-Enter too. How can I run line-by-line, e.g. to see the plot of gradient(20,10) in the final line of that test?
Regarding the first part’ For testing there is the great TestEnv package which should at least fix missing dependencies problems. So you activate your general environment of that package and then invoke the TestEnv activate function.
Thanks! I just tried TestEnv, it allows me to activate the module’s test environment, but when I try to run using RayTracingWeekend with Shift-Enter I still get the same error message… i.e. I can’t use my own module’s functions in its tests when I run interactively…
It now looks like problem #1 may be a bug specific to the previous version of vscode (and possibly the newer one too - I didn’t try it since it has a different bug ). I tried vscode-insiders 1.64.0 with the Julia-insiders plug-in, and I’m able to run using RayTracingWeekend without problem.
As for problem #2… I finally noticed that there’s an issue for that: