About LeetScope
LeetScope brings Python Tutor to LeetCode.
We love Python Tutor by Philip Guo. It's the best way we know to see what Python is actually doing. Using it for LeetCode was a pain though. You had to copy your code over, build the linked list or tree by hand and paste in the test case. LeetScope does all of that in one click, so we wanted to share it.
Pick a test case, click Visualize and step through your solution line by line. Every variable, list, dict and object is drawn out as it changes.
How to use it?
1. Open a problem on leetcode.com, with the language set to Python3.
2. Write your program and run it, or just open your "Testcase" tab.
3. Click Visualize in LeetCode's top bar, or press Alt+V.
Features
• Step back and forth, jump around the timeline, or play at 0.5x, 1x or 2x.
• Linked lists, trees, grids, dicts, sets, heaps and your own classes, all drawn out.
• A separate frame for each recursive call.
• LeetCode's example cases, plus any you add.
• Checks your output against the expected answer.
• Design problems like LRU Cache work too.
• 2,300+ problems supported, with more coming.
Privacy
Everything runs locally. Python runs inside the extension (via Pyodide) in a sandbox with no network access. No account, no tracking, no server.
Feedback
Found a bug or have an idea? Click the flag icon in LeetScope's top bar. It opens a short form with the details filled in. Nothing is sent until you submit it. Nothing leaves your browser unless you send a bug report.
License
Proprietary. Copyright © 2026 The LeetScope authors. All rights reserved.
The tracer and renderer started as forks of Python Tutor by Philip Guo (MIT license) and have since been modified and extended. The rest is our own work. Python runs on Pyodide (MPL 2.0). Both licenses ship with the extension.
Thanks to Philip Guo and team for publishing an open-source version of Pythontutor. LeetScope wouldn't exist without it.
Not affiliated with or endorsed by LeetCode.