[Truffle] Move some debug operations into a separate class.
[Truffle] Utility to get the context from an object.