No edit summary |
m (Simple PHP Debugging Maps moved to Simple PHP debugging maps: Page moved by JohnBot to improve title) |
Revision as of 10:13, 18 October 2007
Tip: #1025 - PHP editing
Created: October 25, 2005 7:41 Complexity: basic Author: zzapper Version: 5.7 Karma: 4/5 Imported from: Tip#1025
Hi,
I use the following 4 maps
The first two just spit out the debug code and I hand type in any variables I want to display:-
iab phpb exit("<hr>Debug ");
iab phpv echo "<hr><pre>";var_dump($a);exit("debug ");
The 2nd two automatically display any variables I have yanked into register 'a'
In fact I use this all the time. eg yank in all the parameters of a function
iab phpbb exit("<hr>Debug <C-R>a ");
iab phpvv echo "<hr><pre>";var_dump(<C-R>a);exit("debug ");
Var_dump is used for displaying arrays (note the use of <pre>)
Comments
Obviously can be adapted to any other script/language. The cute bit though is the yanking, saves LOTS of typing
zzapper , October 26, 2005 7:50
Or maybe a little bit brutal:
iab phpallv print_r(get_defined_vars());
This will print out all defined variables.
lucifuge--AT--web.de , October 26, 2005 10:12