Overview
Features
Settings
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
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.
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.