How to use InspectMe directly from within a method?

I can’t find any example of calling InspectMe for debugging from within a custom method: could someone provide an example?

let’s say i am calling an instance A , which calls method A.
In method A i want to use InspectMe.

Hi @gquentin

Simple you can just use loops from InspectMe in you method, like this:

$evm.root.attributes.sort.each { |k, v| $evm.log("info", "  Attribute - #{k}: #{v}") }
$evm.root.associations.sort.each { |assc| $evm.log("info", "    Associations - #{assc}") }

In most cases this is enough.

ok but i can’t call InspectMe directly?


Like any other instances: