drink icon indicating copy to clipboard operation
drink copied to clipboard

feat(revive): alternative tracing approach to debug contracts

Open chungquantin opened this issue 8 months ago • 1 comments

In #143, the .debug_message field and intercept contract call feature are removed #144. We might need to implement an alternative approach to support debugging contracts with drink. See https://github.com/use-ink/ink/tree/master/integration-tests/public/debugging-strategies

chungquantin avatar May 08 '25 06:05 chungquantin

Implementation suggestion: For tracing, technically we could just retrieve the call trace in related tests, and use that do similar assertions and print similar/equivalent info in tests and examples that were previously relying on TracingExtT::after_call implementations. But there's nothing Drink! specific about doing that, so may be it's kinda pointless (in the context of Drink!).

Perhaps some kind of visitor API (think tree visitor) that accepts a call trace and provides a simple API for traversing various entities in the trace would be more useful. Think associated methods like visit_call, visit_log that provide simple hooks for traversing a call trace.

chungquantin avatar May 20 '25 06:05 chungquantin