Overview

Motivation

Statistics

Features

Insert a log message

Comment inserted log messages

Uncomment log messages

Delete log messages

Correct log messages

Settings

Custom Prefix

Custom Suffix

Log Function Type

Log Function Name

Custom delimiter

Custom quote

Use semicolon

Enclosing class

Enclosing function

Include file name and line number

Include file name

Include line num

Wrap log message

Line before log message

Line after log message

Join the Turbo Tribe

30% Off

Subscribe to our newsletter to receive the latest updates, contribute to Turbo's future through surveys, and get an automatic 30% discount on Turbo Pro!

Get Latest Updates

Shape Turbo's Future

30% Off Turbo Pro

Get 30% off • Shape the future • Zero spam

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

  1. 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.


  2. 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.