Thanks!
- I still find that I need Method 2 to run line-by-line.
- What you say is true except in the important case that the line of code you are trying to run from your package
src
requires a package dependency. For example,using MyPackage; df = DataFrame()
will not work even ifDataFrames.jl
is a dependency ofMyPackage.jl
. I couldusing MyPackage, DataFrames; df = DataFrame()
, but then I have to installDataFrames
in my test environment and it could use a different version than is allowed inMyPackage
’sProject.toml
. - I have Revise working like it should now. I meant that clicking “Run and Debug” on my test file runs very slow compared to “Ctrl+Enter”-ing a few choice lines in
src
using Method 2.
One option I found recently is the @run
macro defined in VSCode. Writing @run f(x)
in the REPL will start debugging on just that MyPackage function (as opposed to running your entire test file). It is still somewhat slow and doesn’t work on individual lines, but it works pretty well as long as your functions are broken down into small/cheap enough pieces. A limitation of this approach though is that you cannot define new variables once you are in the debugger like you could if you were in the REPL.