8000 GitHub - tuur29/vscode-turbo-console-log
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tuur29/vscode-turbo-console-log

 
 

Repository files navigation

! This repo is a fork of Turbo Console Log from Chakroun Anas. It will be removed if / once my PRs have been merged into the main repo.

Main Functionality


This extension make debugging much easier by automating the operation of writing meaningful log message.

Features


I) Insert meaningful log message automatically

Two steps:

  • Selecting the variable which is the subject of the debugging

  • Pressing ctrl + alt + L

The log message will be inserted in the next line relative to the selected variable like this:

console.log("SelectedVariableEnclosingClassName -> SelectedVariableEnclosingFunctionName -> SelectedVariable", SelectedVariable)

alt text

Multiple cursor support:

alt text

Properties:

  • turboConsoleLog.wrapLogMessage (boolean): Whether to wrap the log message or not.

  • turboConsoleLog.logMessagePrefix (string): The prefix of the log message, default one is TCL.

  • turboConsoleLog.addSemicolonInTheEnd (boolean): Whether to put a semicolon in the end of the log message or not.

  • turboConsoleLog.insertEnclosingClass (boolean): Whether to insert or not the enclosing class of the selected variable in the log message.

  • turboConsoleLog.insertEnclosingFunction (boolean): Whether to insert or not the enclosing function of the selected variable in the log message.

  • turboConsoleLog.quote (enum): Double quotes (""), single quotes ('') or backtick(``).

A wrapped log message :

alt text

II) Comment all log messages, inserted by the extension, from the current document

All it takes to comment all log messages, inserted by the extension, from the current document is to press alt + shift + c

alt text

III) Uncomment all log messages, inserted by the extension, from the current document

All it takes to uncomment all log messages, inserted by the extension, from the current document is to press alt + shift + u

alt text

IV) Delete all log messages, inserted by the extension, from the current document

All it takes to delete all log messages, inserted by the extension, from the current document is to press alt + shift + d

alt text

V) Add styling options for each part of the variable's path definition.

Properties:

  • turboConsoleLog.styleArray (string[], max 3): a list of CSS stylings, to be applied to prefix, class/function and variable name.

Warning:

The extension rely on the log message prefix in order to detect the generated log messages, missing up the prefix will result on the failure of the detection and hence the failure of commenting, uncommenting and deleting the log messages.

Release Notes


1.0.0

Initial release of Turbo Console Log

1.1.0

  • New feature: The possibility of wrapping the log message is added

1.2.0

  • New feature: Comment all log messages inserted by the extension
  • New feature: Uncomment all log messages inserted by the extension
  • When requested, only the log messages inserted by the extension will be commented, uncommented or deleted

1.3.0

  • Multiple cursor support

1.4.0 (tuur29)

  • New feature: Add styling options

License


MIT © Chakroun Anas Edited by Tuur Lievens


Enjoy!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%
0