r/codereview • u/SquashHot4348 • 22d ago
Functional Wanna see how your code thinks? 🤔
/r/leetcode/comments/1xvaj4j/wanna_see_how_your_code_thinks/1
u/jazzmyne_Rebela 20d ago
sounds like an execution visualizer or tracer? hard to tell what youre pitching without a post body or snippet though
1
u/SquashHot4348 20d ago
Yeah, that's pretty much it! AlgoLens is a code execution visualizer built specifically around the LeetCode workflow.
The idea is to help you understand how your solution actually executes, rather than just reading the code. It traces execution step by step, highlights the currently executing line, and visualizes variable changes and the call stack.
It supports Python, Java, C++ and JavaScript.
I built it because I felt that understanding how an algorithm executes is just as important as knowing the solution itself.
Here's the extension if you'd like to take a look: https://microsoftedge.microsoft.com/addons/detail/jhhkkpabkoeaiajdilomalbmjdppcmcc
1
u/DickBrainTime 21d ago edited 7d 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.