JuliaDebug / Gallium.jl

The Julia debugger
Other
174 stars 23 forks source link

functions within submodules can't be debugged #159

Closed musm closed 7 years ago

musm commented 7 years ago
using Gallium

module Test

   module Inner
    f(x) = x 
   end

using .Inner

end

julia> @enter  Test.Inner.f(2.2)
ERROR: MethodError: objects of type Module are not callable
musm commented 7 years ago

I just checkout AbstractTrees, now Gallium errors

INFO: Precompiling module Gallium.
ERROR: LoadError: BoundsError: attempt to access ()
  at index [11]
 in getindex(::Tuple{}, ::Int64) at .\tuple.jl:8
 in getnode(::Expr, ::AbstractTrees.ImplicitNodeStack{Any,Int64}) at C:\Users\Mus\.julia\v0.5\AbstractTrees\src\implicitstacks.jl:21
 in next(::AbstractTrees.PostOrderDFS, ::Nullable{AbstractTrees.ImplicitNodeStack{Any,Int64}}) at C:\Users\Mus\.julia\v0.5\AbstractTrees\src\AbstractTrees.jl:445
 in next(::AbstractTrees.IndEnumerate{AbstractTrees.PostOrderDFS}, ::Nullable{AbstractTrees.ImplicitNodeStack{Any,Int64}}) at C:\Users\Mus\.julia\v0.5\AbstractTrees\src\AbstractTrees.jl:259
 in goto!(::ASTInterpreter.Interpreter, ::Int64) at C:\Users\Mus\.julia\v0.5\ASTInterpreter\src\ASTInterpreter.jl:548
 in _step_expr(::ASTInterpreter.Interpreter) at C:\Users\Mus\.julia\v0.5\ASTInterpreter\src\ASTInterpreter.jl:609
 in step_expr at C:\Users\Mus\.julia\v0.5\ASTInterpreter\src\ASTInterpreter.jl:666 [inlined]
 in #finish!#81(::Bool, ::Bool, ::Function, ::ASTInterpreter.Interpreter) at C:\Users\Mus\.julia\v0.5\ASTInterpreter\src\ASTInterpreter.jl:1720
 in (::ASTInterpreter.#kw##finish!)(::Array{Any,1}, ::ASTInterpreter.#finish!, ::ASTInterpreter.Interpreter) at .\<missing>:0
 in _precompile_() at C:\Users\Mus\.julia\v0.5\ASTInterpreter\src\precompile.jl:5
 in include_from_node1(::String) at .\loading.jl:488
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:234
 in process_options(::Base.JLOptions) at .\client.jl:239
 in _start() at .\client.jl:318
while loading C:\Users\Mus\.julia\v0.5\ASTInterpreter\src\ASTInterpreter.jl, in expression starting on line 1742
ERROR: LoadError: Failed to precompile ASTInterpreter to C:\Users\Mus\.julia\lib\v0.5\ASTInterpreter.ji.
 in compilecache(::String) at .\loading.jl:593
 in require(::Symbol) at .\loading.jl:393
 in include_from_node1(::String) at .\loading.jl:488
 in macro expansion; at .\none:2 [inlined]
 in anonymous at .\<missing>:?
 in eval(::Module, ::Any) at .\boot.jl:234
 in process_options(::Base.JLOptions) at .\client.jl:239
 in _start() at .\client.jl:318
while loading C:\Users\Mus\.julia\v0.5\Gallium\src\Gallium.jl, in expression starting on line 3
ERROR: Failed to precompile Gallium to C:\Users\Mus\.julia\lib\v0.5\Gallium.ji.
 in compilecache(::String) at .\loading.jl:593
 in require(::Symbol) at .\loading.jl:422
Keno commented 7 years ago

Sorry about that. I had turned off precompile while testing this to avoid having to wait for that. I'll take a look.

Keno commented 7 years ago

Try with https://github.com/Keno/ASTInterpreter.jl/commit/2f1aaeb5efa8423bf7833c3d3f067d39323966b3

musm commented 7 years ago

Works. Thanks@