r/codereview • u/SquashHot4348 • 20d ago
Functional Wanna see how your code thinks? 🤔
/r/leetcode/comments/1xvaj4j/wanna_see_how_your_code_thinks/
1
Upvotes
r/codereview • u/SquashHot4348 • 20d ago
1
u/DickBrainTime 18d ago edited 5d ago
I'd most want object identity and mutation history, not just the current line or scalar variable values. For example, with
let a = [1]; let b = a; b.push(2), showaandbpointing to the same heap object, and highlight the mutation to that object. The same idea is especially helpful with linked lists, trees and recursive functions where several frames hold references to one node.For recursion, a timeline showing each frame's own locals, the return value and which shared objects changed would make backtracking much easier to understand. Two small UX details: show why a branch condition evaluated true/false, and let someone jump backward to the last mutation of a chosen variable/object rather than stepping through hundreds of lines. I'd also cap trace length or sample large loops so the visualization stays usable. I haven't tested AlgoLens; this is the specific kind of DSA debugging view I'd find useful.
1
u/jazzmyne_Rebela 17d ago
sounds like an execution visualizer or tracer? hard to tell what youre pitching without a post body or snippet though