Is there a way to find all places in my code base where a specific method (not function!) gets called (or may get called)? The method in question for me is Base.*
, so grep
ing for * over the whole code base produces way to many hits and I really only want all the places where my specific implementation of Base.*
for some custom types gets called.
Could I e.g. inside my method definition add some code to find out where it got called from and
print that and run the tests that I have? So something like:
function Base.*(a::MyType, b::MyType)
println(whocalledme())
return dostuff(a, b)
end
where whocalledme()
returns where Base.*
just got called from and probably involves some debugger magic. Is such a thing possible?