JuliaDebug / Cthulhu.jl

The slow descent into madness
MIT License
650 stars 41 forks source link

One-step version of `@descend` to replace `@code_warntype`? #440

Open gdalle opened 1 year ago

gdalle commented 1 year ago

I recently wanted to use Cthulhu in a Pluto notebook for teaching purposes, and I couldn't because @descend requires interactivity. As underlined by @timholy in this Discourse thread, @descend is a worthy and more readable replacement for @code_warntype in many situations. Would it make sense to define a macro that does one step of descent and then stops before the madness takes over? Something like printstyled in this subpackage?

vchuravy commented 1 year ago

There is already cthulhu_typed and cthulhu_warntype https://github.com/JuliaDebug/Cthulhu.jl/blob/6fa3530f5ea95dbf9dea42b4311c2189975bc096/src/codeview.jl#L95