JuliaDebug / Gallium.jl

The Julia debugger
Other
174 stars 23 forks source link

RFC: Added error when setting bp in unknow file. #138

Closed mauro3 closed 8 years ago

mauro3 commented 8 years ago

Currently no error is thrown when adding a break-point to a unknown file:

julia> using Gallium

julia> bp = breakpoint("/tmp/non-existant.jl", 2)
Locations (+: active, -: inactive, *: source):
 * Any method reaching /tmp/non-existant.jl:2

With this Pr:

julia> bp = breakpoint("/tmp/non-existant.jl", 2)
ERROR: No file /tmp/non-existant.jl found in loaded packages or included files.
 in breakpoint(::String, ::Int64) at /home/mauro/.julia/v0.5/Gallium/src/breakfile.jl:134
 in eval(::Module, ::Any) at ./boot.jl:234
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46

If this is a desired feature, I can add tests.

Keno commented 8 years ago

No, this is intentional in case you load something that uses that file later.

mauro3 commented 8 years ago

Yes, one would need to include/use first. Maybe a warning?

Keno commented 8 years ago

Yes, I think a warning would be fine.

mauro3 commented 8 years ago

Ok, now a warning with the same text.