Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto LoggerNew to Visual Studio Code? Get it now.
Auto Logger

Auto Logger

Pedro Rodrigues

|
208 installs
| (0) | Free
Automatically writes logs on code and helps php convert arrays in php (array) and objects in php (object)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

auto-logger

auto-logger is a simple Visual Studio Code extension designed to help you write logs faster and improve debugging time. It provides a collection of code snippets for multiple programming languages, making it easier to add consistent and useful logs during development.

The extension is available on the Visual Studio Code Marketplace, with over 200 installs.

php-helper

To use this features, search the commands on: ctrl + shift + p This extension, is responsable to:

Convert php object to php array

Command: To php array

Convert php array to php object

Command: To php object

Supported Languages

  • C++
  • JS/JSX/TSX
  • PHP/Laravel
  • Python

C++ Snippets

Empty String Logger

!l
std::cout << "${1:Message}" << std::endl;

For Loop

!fr
for (int ${1:i} = 0; ${1:i} < ${2:count}; ${1:i}++) {
    ${3:// code...}
}

While Loop

!wh
while (${1:condition}) {
    ${2:// code...}
}

Switch Case

!sw
switch (${1:variable}) {
    case ${2:value1}:
        ${3:// code...}
        break;
    case ${4:value2}:
        ${5:// code...}
        break;
    default:
        ${6:// code...}
}

Integer function

!ifunc
int test()
{
    //
}

Void function

!vfunc
void test()
{
    //
}

String function

!sfunc
std::string test()
{
    //
}

Class

!cls
class Test
{
    public:
        //
}

JavaScript/JSX/TSX Snippets

Basic Logger

!lb
console.log()

Variable Logger

!lv
console.log($1)

Empty String Logger

!l
console.log('${1}')

Debugger

!d
debugger;

Console Error

!ce
console.error('${1}')

Function

!f
function test()
{
    //
}

Const function

!cf
const test = () => 
{
    //
}

PHP/Laravel Snippets

Basic Logger

!lb
\Log::debug('log');

Variable Logger

!lv
\Log::debug($1);

Empty String Logger

!l
\Log::debug('${1}');

Empty String Printer

!p
print_r('${1}');

Die

!dd
die();

Die with Message

!ddm
die('${1}');

Exit

!ex
exit();

Timer

!t
$startTime = Carbon::now();
\Log::debug('TIMER START');
//CODE HERE
\Log::debug('TIMER END');
\Log::debug('START: ');
\Log::debug($startTime);
$endTime = Carbon::now();
\Log::debug('END: ');
\Log::debug($endTime);
\Log::debug('END-START(MS): ');
\Log::debug($endTime->diffInMilliseconds($startTime));

Private function

!prf
private function test()
{
    //
}

Public function

!puf
public function test()
{
    //
}

Protected function

!ptf
protected function test()
{
    //
}

Class

!cls
class teste
{
    public function __construct()
    {
        //,
    }
}

Python Snippets

Basic Logger

!lb
print('log')

Variable Logger

!lv
print($1)

Empty String Logger

!l
print('${1}')

Function

!f
def teste():
    #teste

Feel free to contribute by adding more snippets or suggesting improvements. If you encounter any issues, please report them in the "Issues" section.

License: This project is licensed under the MIT License.

Release Notes

  • NPM vulnerability fix

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft