Last active
February 17, 2017 08:12
-
-
Save derpixler/4817afee2310c73f7b6b04496380fb14 to your computer and use it in GitHub Desktop.
PHPstorm better DebugSnipped
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 1. Goto Preferences -> Editor -> Live Template -> PHP | |
* 2. Klick in the right + | |
* 3. chose Live Template | |
* 4. Give a abbreviation like "pdebug" | |
* 5. Copie the Template into Template Text | |
* 6. in your code Type "pdeb.." use auto compleate ;) | |
* | |
* You get a Debug like this. | |
* | |
* Array | |
* ( | |
* [DEBUG_LOCATION] => Array | |
* ( | |
* [PATH] => /var/www/html/project/Classes/DataGrabber | |
* [FILE] => Offerlinks.php | |
* [FUNCTION] => getLinks:144 | |
* ) | |
* | |
* [DEBUG] => Array | |
* ( | |
* [$objTree->getName()] => Saint Tropez | |
* [$branchId] => 2 | |
* [$objBranchId->getId()] => 1 | |
* ) | |
* | |
* ) | |
* | |
**/ | |
/** The Live Template **/ | |
echo '<pre>';print_r( [ 'DEBUG_LOCATION' => [ 'PATH' => dirname( __FILE__ ), 'FILE' => basename( __FILE__ ), 'FUNCTION' => __FUNCTION__ . ':' . __LINE__ ], 'DEBUG' => [ | |
'$NAME$' => $END$$VAR$, | |
] | |
] );echo '</pre>'; | |
die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment