Overview
Features
Settings
Enclosing class
The insertEnclosingClass setting gives you the ability to include the enclosing class name in the inserted log message. This feature can be incredibly beneficial for quickly discerning the context of the log message without having to track the code execution path.
Usage
To modify the Enclosing Class setting:
Navigate to VS Code settings: File → Preferences → Settings (or Code → Preferences → Settings on Mac). Search for "Turbo Console Log" and locate the insertEnclosingClass setting. Switch the toggle to your desired state.
In your code:
Once enabled, the Turbo Console Log extension will include the enclosing class name in the inserted log messages. For instance, if you're logging a variable within a class named 'Calculator', the inserted log message would look something like this:
console.log('🚀 ~ Calculator → SelectedVariable:', SelectedVariable);
Utilizing the insertEnclosingClass setting can greatly enhance your debugging experience by providing additional context to your log messages. This setting is enabled by default.