Overview

Motivation

Statistics

JS/TS

Insert a log message

Comment inserted log messages

Uncomment log messages

Delete log messages

Correct log messages

PHP (Pro)

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

Enclosing function

Presentation

The insertEnclosingFunction setting lets you include the enclosing function name in the log message generated by the Turbo Console Log extension. This can be quite useful for quickly understanding the context of a particular log message, especially in larger codebases with numerous functions.

Usage

  1. To modify the Enclosing Function setting: Navigate to the settings in VS Code: File β†’ Preferences β†’ Settings (or Code β†’ Preferences β†’ Settings on Mac). Search for "Turbo Console Log" and find the insertEnclosingFunction setting. Switch the toggle to your preferred state.

  2. In your code: Once this feature is enabled, the Turbo Console Log extension will automatically include the enclosing function's name in the log message. For instance, if you're logging a variable within a function named 'calculate', the resulting log message might look something like this:

console.log('πŸš€ ~ calculate β†’ SelectedVariable:', SelectedVariable);

The insertEnclosingFunction setting can greatly enhance your debugging efficiency by providing more context for each log message. This setting is enabled by default.