JuliaDebug / Gallium.jl

The Julia debugger
Other
174 stars 23 forks source link

breakpoint_on_error() doesn't seem to work #188

Open staticfloat opened 7 years ago

staticfloat commented 7 years ago

@keno This is on 0.5, using the latest tag of Gallium.jl.

julia> using Gallium

julia> Gallium.breakpoint_on_error()
Gallium.Hooking.Hook(Ptr{Void} @0x00007ff7dfcf6ec0,UInt8[0x55,0x48,0x89,0xe5,0x53,0x48,0x89,0xfb,0x48,0x83,0xec,0x08,0xe8,0x7f,0x23,0x02,0x00],Gallium.breakpoint_on_error_hit)

julia> model = train_model("orig", CoughModel("SVM"), features)
ERROR: UndefVarError: cross_validate not defined
 in #optimal_model#130(::Int64, ::Bool, ::Function, ::Type{libcough.SupportVectorMachine}, ::libcough.FeatureNormalizer, ::Dict{String,Array{libcough.LSPFeature,1}}, ::Dict{String,Array{libcough.LSPFeature,1}}) at /home/sabae/src/coughsense3/libcough/models/ModelOptimizer.jl:85
 in (::libcough.#kw##optimal_model)(::Array{Any,1}, ::libcough.#optimal_model, ::Type{libcough.SupportVectorMachine}, ::libcough.FeatureNormalizer, ::Dict{String,Array{libcough.LSPFeature,1}}, ::Dict{String,Array{libcough.LSPFeature,1}}) at ./<missing>:0
 in #train_model#139(::String, ::Int64, ::Bool, ::Bool, ::Function, ::String, ::Type{libcough.SupportVectorMachine}, ::Dict{String,Array{libcough.LSPFeature,1}}) at /home/sabae/src/coughsense3/libcough/models.jl:80
 in train_model(::String, ::Type{libcough.SupportVectorMachine}, ::Dict{String,Array{libcough.LSPFeature,1}}) at /home/sabae/src/coughsense3/libcough/models.jl:50

julia> error("test")
ERROR: test
 in error(::String) at ./error.jl:21

As can be seen, Gallium breakpoints are never entered. Is there something I need to do to get breakpoint_on_error() to work?

AStupidBear commented 7 years ago

This is fixed on master and Keno hasn't tagged a new release. But this works for me

cd ~/.julia/v0.5/Gallium
git checkout f654575fe6fab8a2ac5ae3b8537a0beb9de0fa6d .