How do you debug wordpress php code ( Xdebug or any other tool ) ?


#1

Hey guys,
i use sublime text 2 and MAMP/WAMP(sometimes).
is there any good tutorial to debug the php code with line breaks just like an IDE ?

thanks


#2

#3

thanks laranz.

is there any way to do the same with sublime text 2 ? kinda love this editor.


#4

I’m using nothing to debug. Just echo the value and consider how it work. I did it very well with jQuery also.


#5

http://saml.rilspace.org/debug-php-with-xdebug-in-sublime-text-2-in-linux-mint




#6

One of the best things is to always have WP_DEBUG set to true in the wp-config.php file.
This way you’ll even see errors that don’t affect functionality, but are still there.


#7

thanks for replies guys.

i am already aware of basic debugging using echo, print_r and wp_debug.

this is something advanced i am asking for.

i tried SublimeXdebug plugin but had hard time configuring it ( looks like it need to be updated )


#8
atinder said

thanks for replies guys.

i am already aware of basic debugging using echo, print_r and wp_debug.

this is something advanced i am asking for.

i tried SublimeXdebug plugin but had hard time configuring it ( looks like it need to be updated )

try var_dump(); :p hehe bro actually what you want ? If i understood your question properly then, i suppose you need to do unit testing for each module and sub module, it's actually TDD approach, so here you go here

Good luck !


#9
RelStudios said
atinder said

thanks for replies guys.

i am already aware of basic debugging using echo, print_r and wp_debug.

this is something advanced i am asking for.

i tried SublimeXdebug plugin but had hard time configuring it ( looks like it need to be updated )

try var_dump(); :p hehe bro actually what you want ? If i understood your question properly then, i suppose you need to do unit testing for each module and sub module, it's actually TDD approach, so here you go here

Good luck !

that is at later stage.

i actually want to pause the execution using break points in my code in sublime text just like in IDEs


#10
atinder said
RelStudios said
atinder said

thanks for replies guys.

i am already aware of basic debugging using echo, print_r and wp_debug.

this is something advanced i am asking for.

i tried SublimeXdebug plugin but had hard time configuring it ( looks like it need to be updated )

try var_dump(); :p hehe bro actually what you want ? If i understood your question properly then, i suppose you need to do unit testing for each module and sub module, it's actually TDD approach, so here you go here

Good luck !

that is at later stage.

i actually want to pause the execution using break points in my code in sublime text just like in IDEs

I don’t know about sublime ide but in eclipse, netbeans you can do that easily


#11

People move away to PHP because they want to avoid that exact debugging method. It’s tedious and a waste of time.