how to show all defined variables with their values in a separate box

I saw a website that shows you the variables you’ve defined along with their corresponding value using codemirror (below is the screenshot). I searched all the documentation and couldn’t find anything. any suggestion?

There’s no feature like that in the library—you’ll have to run some other code on the editor value to gather this information.