This Visual Studio Code extension allows PHP developers to insert quick debugging snippets into their code. It includes snippets for printing variables using print_r(), var_dump(), or json_encode() along with exit to stop script execution for debugging.
To use a snippet, type its shortcut (e.g., pepr) and press Tab.
Using clrdbg in Real Projects
The clrdbg snippet simplifies PHP debugging by commenting out debug lines (e.g., // DEBUG: echo "<pre>"; print_r($variable); exit;) for temporary disablement. In Laravel projects, it ensures clean code by marking debug statements for easy removal before deployment.
📂 File Support
✅ Works in all .php files
Ideal for PHP projects, including Laravel applications
🔧 Requirements
Visual Studio Code v1.99.0 or higher
PHP project (Laravel support is optional)
📦 Installation
Download or build the .vsix file using vsce package.
In Visual Studio Code, press Ctrl + Shift + P → Extensions: Install from VSIX....
Select your .vsix file to install.
Or, install directly from the Visual Studio Code marketplace by searching for "PHP Debug Snippets".