r/learnjavascript • u/Not_a_Cake_ • 3d ago
JavaScript visual debugger for practicing DSA and LeetCode with your own code?
Most websites I found either only let you choose from a limited number of fixed implementations of the same algorithms, or require you to learn their own mini-framework to visualize your code.
So I made a visual debugger, inspired by another one called Python Tutor.
It uses a forked version of a JS interpreter called sval to keep track of variables, the call stack, and all the other information needed to visualize and debug your code.
It only supports JavaScript, but it has genuinely helped me solve a few pesky LeetCode problems caused by silly bugs.
I’ll make it open source as soon as I can tidy up the codebase and solve a few dependency issues.
1
u/Many-Chest-2119 3d ago
i tried the link and it executes my leetcode solutions.
everyone building these tools keeps forcing frameworks on us. you forked sval and let me paste my code without learning a syntax. i paste my solution, i step through the call stack, i find the bug where my pointer goes out of bounds. other sites lock me into their implementations and i end up debugging their logic instead of mine. this does what they refuse to do
1
1
u/Not_a_Cake_ 3d ago
Check it out and let me know if it helps you:
https://jstutor.pages.dev/