I really like where you’re going with this! My suggestion is that you find some experts in human interface design and see if they’d be willing to help out with the display. I strongly prefer both your latest example of the code blocks, and the ideas that @ssebastianj provided (with the hand-drawn notes in the thread above).
Another thing to consider is how to hide certain variables; if you’ve got some really deeply nested code, you might have a lot going on, but really only want to focus on one or two variables.
Please continue with this project, I honestly don’t understand why more IDEs don’t have something like this already, it’s a fantastic idea!