auto-logger
It's a simple Visual Studio Code extension, to help write log, much faster, to improve debug time.
Contains a collection of code snippets for various programming languages to enhance your coding experience.
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
- Webpack vulnerability fix
Enjoy!