Search code examples
juliavscode-debugger

Julia Debugger.jl - run my code in interpreted mode and the rest compiled


When debugging julia code in vs code there is a convenient token ALL_MODULES_EXCEPT_MAIN that can be set (see 1). Which essentially runs every module in compiled code except my module which I'm interested in debugging. This makes debugging my code in julia much faster.

I'm wondering is it possible to do the same when debugging with Debugger.jl? Which also has a compiled mode (see 2). But how can we exclude my modules from compiled mode?


Solution

  • The token is not there, but you can achieve it as explained here: https://discourse.julialang.org/t/debugging-extremely-slow/53801/54?u=mariusd. That will set as compiled all modules except SomePackage and Main. What has to be done additionally is to recurse in the submodules of each module and set them to compiled as well. Consider to open a PR in https://github.com/JuliaDebug/JuliaInterpreter.jl if you manage to implement this. I think is quite simple to do it. Personally, I debug using the UI option.