log-booster is a simple VS code extension that helps you quickly add log statements to your code.
Made by someone who uses print()
as a debugger. Made for those who use print()
as a debugger.
Please follow the instructions here for installing this extension.
Select the variable/expression you want to log and click ctrl+alt+l
if you are on Windows/linux or cmd+alt+l
if you are on MacOS.
- Informs the user if they invoke the extension
- without a focused editor
- on a non python file
- without any selected text
- Log statements follow the same indentation as the line of the selected text
- A shortcut key is provided to invoke the extension
- Insert log statements before the current line
- Comment all the log statement
- Uncomment all the log statement
- Delete all the log statement
- Only works for Python files
- Logging multi-cursor selections won't work. Only the first selection will be logged.
- Cannot invoke the insert before command through the command pallete. It is only accessible via the shortcut key (
ctrl+alt+l
orcmd+alt+b
). For more details, please see this
The extension was setup using yo and generator-code by following this guide
I used the following resources to help me develop this extension:
nvm 0.39.1 (optional but recommended)
node.js v16.4.2
npm 8.6.0
If you want to contribute any new features or make the extension better, you can send pull requests on this repository.
To start developing make sure you installed the recommended versions of npm and node.js. You can use nvm to manage your node.js versions.
Begin with:
> git clone https://github.com/nvinayvarma189/log-booster
> cd log-booster
> npm install
To invoke the extension
- Click
f5
to open the debugging host vscode window - Invoke the command pallete (
ctrl+shift+p
) on the debugging window and selectLog Booster
- Alternatively to step 2, you can also click click
ctrl+alt+l
if you are on Windows/linux orcmd+alt+l
if you are on MacOS.