LeetYourBrain2Code
Overview
Visualize how your Python code actually executes on LeetCode with local step-by-step runtime evidence.
## English **LeetYourBrain2Code is a visual debugger for Python solutions on LeetCode.** When your code does not behave the way you expect, LeetYourBrain2Code lets you replay what actually happened during execution—step by step—without turning the debugging process into a solver. The extension runs your current Python solution and testcase locally in the browser, captures an execution trace, and presents the runtime state beside the LeetCode editor. ### Debug directly alongside your LeetCode code During trace replay, the currently selected execution line is highlighted directly in the original LeetCode Python editor while the corresponding runtime state is shown in the Side Panel. You can move through the trace using Previous, Next, playback, or the timeline and immediately see which line of your code each state belongs to. Optional **Follow line** behavior keeps the current execution line visible without moving your editing cursor. If you edit the source code after a trace was captured, stale editor highlighting is cleared automatically. The recorded source remains available in the Side Panel when the current editor no longer matches the captured run. ### Inspect what your program actually did Depending on the execution, you can inspect: * the active source line and captured runtime state * local variables and value changes * function calls, returns, exceptions, and call stack * stdout and return values * list and container mutations * linked-list pointer relationships * binary-tree structure and pointer changes * matrix and grid state * graph nodes and runtime connections * expression evaluation evidence * condition and branch evaluation evidence * repeated execution patterns and behavioral timelines ### Understand recursive execution For recursive solutions, the Call Tree view shows concrete runtime calls instead of an inferred algorithm explanation. You can inspect: * function arguments * parent and child calls * recursion depth * return values * exceptions * incomplete call frames captured before execution stopped The Call Tree stays synchronized with the raw execution trace. ### Compare two versions of your execution You can pin one completed or captured run as a baseline and compare it with a later run of the same testcase. LeetYourBrain2Code surfaces the earliest safely aligned observed difference between the two executions, such as a changed decision, mutation, function call, expression result, or frame outcome. This is intended to help answer questions such as: “What changed after I edited my code?” ### Useful even when execution fails A debugging tool is often most useful when the program does not finish normally. For supported failures, LeetYourBrain2Code preserves the trace prefix captured before: * a Python exception * the local trace limit * a local execution timeout You can inspect the available runtime evidence instead of losing the entire execution history. ### Live LeetCode workflow The extension synchronizes with the active LeetCode editor and visible testcase. You do not need to submit your solution before using the visualizer. When runnable Python code and testcase state are available, the extension can update the local visualization as you work. It also follows the active LeetCode tab and pauses safely when you leave LeetCode. ### Local by design Python execution uses bundled Pyodide inside a Web Worker in your browser. Your source code, testcase, execution trace, and comparison state are not sent to a backend by LeetYourBrain2Code. ### Current scope * Python solutions only * local Pyodide execution may differ from LeetCode's judge environment * visualization support is focused on captured runtime structures and evidence * the extension does not infer the intended algorithm or automatically provide the correct solution --- ## 繁體中文 **LeetYourBrain2Code 是一款專為 LeetCode Python 解題流程設計的視覺化除錯工具。** 當你的程式碼「看起來應該可以」,但實際執行結果卻和腦中的流程不同時,LeetYourBrain2Code 可以讓你逐步回放程式真正執行過的狀態。 擴充功能會在瀏覽器本地重新執行目前的 Python 程式碼與 testcase,擷取 execution trace,並在 LeetCode 編輯器旁的 Side Panel 顯示 runtime state。 ### 直接對著 LeetCode 原始程式碼除錯 在回放 execution trace 時,目前選取的執行行會直接高亮在 LeetCode 原本的 Python 編輯器中,同時在右側顯示該步驟對應的執行狀態。 你可以使用: * Previous * Next * Play * Timeline 在 execution trace 中移動,並直接看到目前狀態對應到哪一行程式碼。 可選擇開啟 **Follow line**,讓目前執行行離開畫面時自動捲動回可見範圍,同時不會移動你的編輯游標。 如果你在 trace 產生後修改程式碼,舊的 editor highlight 會立即清除,避免將過期的 trace 誤認為目前程式狀態。如果目前 LeetCode editor 已經和該次執行不同,Side Panel 仍會保留該次 trace 對應的 recorded source。 ### 查看程式實際做了什麼 依照程式執行情況,你可以檢查: * 目前執行的 source line * local variables 與數值變化 * function call、return、exception 與 call stack * stdout 與 return value * List 與 container mutation * Linked List 的 pointer 關係 * Binary Tree 結構與 pointer 變化 * Matrix / Grid 狀態 * Graph node 與 runtime connection * Expression 的實際計算證據 * 條件式與 branch 的實際判斷結果 * 重複執行模式與 behavioral timeline ### 看懂遞迴到底怎麼跑 對於 recursive solution,Call Tree 顯示的是實際發生過的 runtime function calls,而不是模型推測出的演算法流程。 你可以查看: * function arguments * parent / child call 關係 * recursion depth * return value * exception * 執行中止前尚未完成的 call frame Call Tree 也會和原始 execution trace 保持同步。 ### 比較修改前後的兩次執行 你可以把某一次執行固定為 baseline,再與同一組 testcase 的後續執行進行比較。 LeetYourBrain2Code 會呈現兩次執行中最早能安全對齊的差異,例如: * decision result 改變 * mutation 不同 * function call 不同 * expression result 改變 * frame outcome 不同 這個功能主要是幫助回答: 「我改完這段程式碼之後,執行流程到底從哪裡開始不一樣?」 ### 程式失敗時仍然保留可用資訊 Visual debugger 最有價值的時候,往往就是程式沒有正常跑完的時候。 對於支援的失敗情況,LeetYourBrain2Code 會保留中止前已經擷取到的 execution trace,包括: * Python exception * local trace limit * local execution timeout 因此即使程式沒有正常結束,你仍然可以查看停止之前實際發生過的 runtime evidence,而不是只得到一個錯誤結果。 ### 與 LeetCode 解題流程即時整合 擴充功能會同步目前 active LeetCode editor 與可見 testcase。 你不需要先 Submit 才能使用視覺化工具。當目前的 Python code 與 testcase 已經可以執行時,就能在解題過程中直接更新本地 visualization。 切換 LeetCode 題目分頁時,Side Panel 也會跟隨目前 active tab;離開 LeetCode 時則會安全暫停同步。 ### 完全在瀏覽器本地執行 Python 執行透過內建的 Pyodide,在瀏覽器中的 Web Worker 完成。 LeetYourBrain2Code 不會將你的: * source code * testcase * execution trace * baseline comparison state 傳送到後端伺服器。 ### 目前支援範圍 * 僅支援 Python solution * 本地 Pyodide 環境可能與 LeetCode Judge 不完全一致 * 視覺化以實際擷取到的 runtime structure 與 execution evidence 為主 * 不會推測你原本想使用的演算法,也不會自動產生正確解法
0 out of 5No ratings
Details
- Version0.1.1
- UpdatedSeptember 28, 2026
- Offered byarthur422tp
- Size5.36MiB
- Languages中文(台灣)
- Developer
Email
arthur422tp@gmail.com - Non-traderThis developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.
Privacy
LeetYourBrain2Code has disclosed the following information regarding the collection and usage of your data. More detailed information can be found in the developer's privacy policy.
LeetYourBrain2Code handles the following:
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes