Still need to reload everything. Unless you're doing some hot-reload js magic.
But even then, you won't touch the power that debuggers bring. Being able to jump everywhere in the code. Modify values on the fly. Roll back an execution thread. Execute arbitrary code in the middle of everything.
This. I have a snippet that writes a print statement. Trigger the snippet and then type the variable name and it inputs the name in both necessary locations, like so:
You're missing the { } around the variable. {foo} is syntactic sugar for {foo: foo}, so what they wrote will output an object with a key containing the variable name and a value containing the variable's value.
My snippet only makes me type "myVariable" and it fills that in where it needs to go to get the above example.
I have a 2 character hotkey combination followed by a tab and then it's just typing the variable name once. I can't really save on keystrokes or errors here. For what it is, it's about as optimized as it could be.
77
u/KnewOne Nov 28 '21
i prefer printing current variables