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

Custom Prefix

The custom prefix is a critical setting that allows you to specify a unique identifier for log messages inserted by Turbo Console Log. This prefix is essential for the extension's core functionality - it's how Turbo tracks and identifies its own log statements to perform operations like comment, uncomment, delete, and correct. Additionally, the Pro bundle uses this prefix to populate the logs tree panel with your debugging statements.


Important: The prefix always has a default value and cannot be empty. If left blank or omitted, Turbo automatically enforces the rocket emoji (🚀) as the prefix to guarantee proper extension functionality. This ensures that Turbo can always identify and manage its log statements regardless of your configuration.


Usage

  1. To modify the prefix 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 logMessagePrefix setting. Enter your desired prefix string into the input field.


  2. In your code:

    After setting the prefix, when you select a variable and use the Turbo Console Log key command, a log statement will be inserted into your code with your specified prefix. For example, if you have set the prefix to 👊, the inserted log message would look something like this (note the ~ delimiter that separates the prefix from the variable name):

console.log('👊 ~ SelectedVariable:', SelectedVariable);

The logMessagePrefix is especially useful to differentiate your debug log messages from regular console logs or logs inserted by other team members. With Release v3.4.0, this prefix now works across all console methods (log, info, debug, warn, error, table, and custom), ensuring consistent branding across your entire debugging workflow regardless of which console function you choose.