Consider the following code in badprofile.jl
using IProfile
using Debug
@iprofile begin
# add the debug macro makes the function disappear if inside an iprofile block
@debug function imgone()
print("I'm Here\n")
@bp
end
end
Observe what happens if you try to use this code.
julia> require("badprofile")
julia> imgone()
ERROR: imgone not defined
julia>
Now suppose I remove the @debug macro from imgone. I then get the correct behavior
julia> require("badprofile")
julia> imgone()
I'm Here
There is some kind of nasty interaction between these macros in the two packages. Now it may be unreasonable to do debugging inside a profiling block, however one is supposed to be able to turn the profiler off without messing with the iprofile begin and end block.
Not sure if this is a debug problem or iprofile problem or both. This is not a show stopper by any means, but if it's intended behavior perhaps it should be documented or something.
Consider the following code in badprofile.jl
Observe what happens if you try to use this code.
julia> require("badprofile")
julia> imgone()
ERROR: imgone not defined
julia>
Now suppose I remove the @debug macro from imgone. I then get the correct behavior
julia> require("badprofile")
julia> imgone()
I'm Here
There is some kind of nasty interaction between these macros in the two packages. Now it may be unreasonable to do debugging inside a profiling block, however one is supposed to be able to turn the profiler off without messing with the iprofile begin and end block.
Not sure if this is a debug problem or iprofile problem or both. This is not a show stopper by any means, but if it's intended behavior perhaps it should be documented or something.