eval·lens
evaluate your Python, through a lens.
A notebook's feedback loop, inside an ordinary Put the cursor on a line. Press
The fourth line is the surprise. You changed Earlier readings stay beside their statements: Who it's forFor students and anyone learning Python, Evalens makes it easier to connect the code you write with the values it produces. Predict an answer, run a statement, and compare. Teachers and mentors can use the same view to explain a tricky idea. As you gain experience, use it to try expressions, inspect data, and explore unfamiliar code. Keep the debugger for breakpoints and stepping through function calls. A total that keeps starting overSuppose you want to add
Look at Change the line inside the loop to:
Read that as: take the total so far, add the next number, and store the new
total. Evaluate the whole file again with That is useful in your first Python course. It is still useful when you know the language and are trying to understand someone else's code. Your first evaluationYou need VS Code 1.90 or later and Python 3.9 or later. Evalens can
use the interpreter selected in the Python extension, or find Install Evalens from the VS Code Marketplace, published by mbjarland, or run:
Open a Python file and try the four-line example:
Start on the first line. Press With focus in the Python editor:
Nothing runs as you type. Evaluation runs a complete enclosing statement: placing the cursor inside a loop runs that loop. Your file stays ordinary Python, with no cell markers or saved outputs added to it. Every command is also in the Command Palette: When the answer needs more roomHover for a longer value or an error's traceback. For larger results, open
Evalens: Show Values Panel: the source sits beside its recorded values
and
Fold a tall result back to the height of its code. Open a large recording in an editor tab to find, select, and copy the part you need. Browsing results does not run the program again. A loop tells you what happenedEach pass through the outer loop sets
Copy this example
Each loop keeps its own value history beside its
Short loops stay compact. Longer histories and output fold or page, with the same navigation at each level. If details were not saved, the panel says so. About these values explains when the values were read; the loop guide covers capture limits and missing readings. Room to growFor a place to start, choose Evalens: Open Learning Walkthrough, or Try a guided example in the empty Values panel. Five editable exercises invite you to predict a value, follow successive statements, explore aliasing, fix an accumulator, and recognize a stale result. Opening one never runs it.
Keep the guides nearby while you need them. Dismiss the introduction when you know your way around; Help and learning brings it back. The same tool is ready for inspecting an unfamiliar data structure, trying a comprehension, or adding an expression watch inside a loop. There is no beginner mode to outgrow. When the question needs a breakpoint, a function call followed step by step, or a look at the call stack, use the Python debugger. Evalens runs statements and keeps their answers; the debugger lets you pause inside an execution. Both earn their place. What stays, what resetsEach result records what that statement produced when it ran. It does not promise that Python still holds that value. Stale markers flag edits and some dependency changes; alias mutations are not fully tracked. Evaluate again when you want a fresh reading. Statement evaluations share a Python session. Clear Inline Results clears the display and keeps variables. Restart Kernel discards variables and saved input answers, while earlier recordings remain visible. Evaluate File resets variables by default. A debugger starts its own execution. The session guide explains the choices. Reference and supportUser guide · Commands · Settings and colors · Release notes · Report an issue MIT licensed. See LICENSE. The inline rendering approach builds on Calva. |