bon icon indicating copy to clipboard operation
bon copied to clipboard

feat(debug): dump attribute which is local expand (see example)

Open dzmitry-lahoda opened this issue 6 months ago • 1 comments

see https://github.com/frozenlib/test-strategy?tab=readme-ov-file#arbitrarydump .

so if I add dump, i can do local expand to see internals, without relaying on expand.

for me expand not always working and sometimes I just need one thing to be expaned.

dzmitry-lahoda avatar Jun 25 '25 10:06 dzmitry-lahoda

Hi. I assume by "expand" you refer to the cargo-expand CLI tool?

cargo-expand does lack the ability to do granual expansion of a specific macro - that's why I have never been using it. Instead, I use Rust Analyzer's command "Epand macro recursively" that can be invoked on a specific macro.

There is a demo of doing this with bon's macros here. Having that feature of Rust Analyzer I never had a need for a special dump attribute.

Veetaha avatar Jun 25 '25 12:06 Veetaha