Laravel Wow - VSCode Extension
Laravel Wow is a Visual Studio Code extension that simplifies debugging in Laravel applications by providing quick commands to wrap variables in dd()
or insert debugging code like dd('here');
or Insert a Json Response block like:
return response()->json(['message'=> 'success', 'data'=> $data]);
Features
1. Wrap Variables in dd()
Quickly wrap selected text or variables in dd()
.
- Command:
extension.wrapInDD
- Keybinding (default):
- Windows/Linux:
Ctrl+Alt+D
- Mac:
Cmd+Alt+D
Example:
Before:
$variable; //variable
After:
$variable;
dd($variable); // dd in the next line
- Insert
dd('here');
Insert dd('here');
for quick debugging.
- Command:
Insert dd('here')
- Keybinding (default):
- Windows/Linux:
Ctrl+D D
- Mac:
Cmd+D D
Example: Before:
$variable
- Insert
dd('here');
Insert dd('here');
for quick debugging.
- Command:
Insert dd('here')
- Keybinding (default):
- Windows/Linux:
Ctrl+D D
- Mac:
Cmd+D D
Example:
Before:
$variable
After :
$variable
dd('here'); // added dd('here'); in the next line
3. Insert Log::info('Logged Here:', $selected);
in the next line
Quickly wraps selected variable to Log::info('Logged Here:' , $example);
.
- Command:
extension.wrapInLog
- Keybinding (default):
- Windows/Linux:
Ctrl+L L
- Mac:
Cmd+L L
Example:
Before:
$variable
After :
$variable
Log::info('Logged Here:', $variable); // added Log::info(); in the next line
4. Insert return response()->json(['message'=> 'success', 'data'=> $data]);
in the next line
Quickly wraps selected variable to return response()->json(['message'=> 'success', 'data'=> $data]);
.
- Command:
extension.wrapInJsonResponse
- Keybinding (default):
- Windows/Linux:
Ctrl+J J
- Mac:
Cmd+J J
Example:
Before:
$variable
After :
$variable
return response()->json(['message'=> 'success', 'data'=> $variable]); // added Json Response in the next line
4. Insert dump($value);
in the next line
Quickly wraps selected variable to dump($value)
.
- Command:
extension.wrapInJsonResponse
- Keybinding (default):
- Windows/Linux:
Ctrl+alt+x
- Mac:
Cmd+alt+x
Example:
Before:
$variable
After :
$variable
dump($value); // added Dump in the next line
Developer
Snyype
GG