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+Alt+H
- Mac:
CMD+Alt+H
Example: Before:
$variable
- Insert
dd('here');
Insert dd('here');
for quick debugging.
- Command:
Insert dd('here')
- Keybinding (default):
- Windows/Linux:
Ctrl+Alt+H
- Mac:
CMD+Alt+H
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+Alt+L
- Mac:
CMD+Alt+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+Alt+j
- Mac:
CMD+Alt+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.wrapinDump
- Keybinding (default):
- Windows/Linux:
Ctrl+Alt+X
- Mac:
Cmd+alt+x
Example:
Before:
$variable
After :
$variable
dump($value); // added Dump in the next line
5. Insert Php snippets
Add helper snippets for your productivity.
Example:
pubf
After :
// use tab to jump
public function functionName()
{
// Your code here
}
Trigger Snippet Copy Window
Press theese keybinds to trigger a php snippet window
Command : Ctrl+Alt+i
From the Laravel Wow Team
- Your system shortcuts may override the default keybindings. You can change the keybindings in the VSCode settings.
- If you have any suggestions or issues, please feel free to open an issue on the GitHub repository.
Developer
snyype
MIT liscense