For Debugger.jl, I assume compiled mode is enabled by default for @run
? How do I disable it? I want to disable it to be able to step through the type inference code in the compiler. Can’t use VS Code’s debugger because it doesn’t work on nightly Julia.
Ah, I can just do that on Compiler.jl now.
EDIT: example:
using Compiler: Compiler
f = Base.promote_typeof
atypes = Tuple{UnitRange{Int64}, UnitRange{Int64}, Vector{Any}, Vararg{UnitRange{Int64}}}
m = methods(f, atypes)[2]
interp = Compiler.NativeInterpreter()
sparams = Core.svec()
types = Tuple{typeof(f), atypes.parameters...}
Compiler.typeinf_type(interp, m, types, sparams)
using Debugger: Debugger
Debugger.break_on(:error)
Debugger.@run Compiler.typeinf_type(interp, m, types, sparams)