I'm trying to make a vscode snippet for python. Suppose I have a line of code like this:
my_var = call_some_function()
I'd like to double click on my_var to select it, hit a key, and it produces the following result:
my_var = call_some_function()
LOGGER.debug("my_var: %s", my_var)
<cursor is here>
Also it should work for an expression too, like if I select "x + y + z" in this line and hit the key:
call_function(x + y + z)
It should produce:
call_function(x + y + z)
LOGGER.debug("x + y + z: %s", x + y + z)
<cursor is here>
Obviously using a debugger is better. But sometimes you cannot use a debugger.