![]() Also, if you already have text selected it will be put inside the log statement. The only minor annoyance I have with it is that it’s dangerously close to the Command + q combo, which is QUIT, so I wish there’s a way to customize the key combo, but so far I enjoy this extension. In order to do this in VSC, you need an extension, I suggest you use the Console Wrapper plugin, Simply highlight something and press CTRL. Pressing CTRL + SHIFT + L will output the console snippet. (If you don’t highlight anything, and press CTRL + q, then it will put whatever is on your clipboard as the arguments) This plugin does it a bit further, by making a string of the item you want to log concatenated with its value and indent it by a tabspace, so for example, if you highlight the word “ myVariable“, the console output would be: typescript What is the shortcut in Visual Studio Code for console.log 0 Printing the value of a variable is very simple, but also something very repeatedly & frequently needed and done, so it necessitates the quickest of the shortcuts So I recommend another solution in which you don’t even need to select anything. In order to do this in VSC, you need an extension, I suggest you use the Console Wrapper plugin, Simply highlight something and press CTRL + q and it will log for you. This is the shortcut to stop the debug session. Console. This is the shortcut to initiate a debugging session or continue the session if paused. Here is the snippet to bind a keyboard shortcut to create a console log statement. I havent used much of shortcuts before but using shortcuts will save my time and help me to write code faster. This helps in checking whether this line of code is executing properly or there are any errors. ![]() (credits to this gist) Visual Studio Code Ive learnt more about using emmet and things that would be useful when using Visual Studio Code. ![]() ![]() ![]() Now you can wrap anything you highlighted to the console log statement by pressing Command + k, you can also insert an empty console.log if you don’t highlight anything. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |