Hints to debug
-
Please share with me all the suggestions/tricks/tools you have/use to debug the WP/WPMU/BP Code, thank you very much for all the replies!
-
I can understand that this question could be not related to BP directly (even if actually it is), but let it be unsanwered doesn’t help the community to find new possible contributors.
letting it unanswered means there is no answer to the question…
nobody can give you any hint on how to debug if you know nothing about coding… if you know about coding, you know how to debug, that’s how it goes.
C’mon, nexia, everyone’s got to start somewhere.
nig3d, I gave a couple suggestions for how to learn more about the interiors of BP here: https://buddypress.org/forums/topic/set-activity-filter-to-specific-value#post-36194
As for debugging, you should get to know how to use tools like var_dump, which, when dropped into a piece of code, can give you a sense of where and why things are not going the way you expect.
yeah, sorry Boone, but randomness is not my cup of tea… asking for answers that way is not a good way to start…
Ha ha, agreed, nexia. I always learn better when my questions are, you know, specific
oh yes i know you can be specific Boone…
*(your avatar shows it!)
For the OP, knowing how to use the programs help. I’ve seen too many threads with people spending hours over issues trying to fix something when the setup is working how it should, just not the way they expected.
Being familiar with your server helps too. Anything borks, I (and others) will tell you to check your error logs first. They could be anywhere, it depends on your server.
I don’t expect people to be able to code, but for heavy debugging, you should be able to read the code and have a general knowledge of what it’s supposed to do. That comes with experience. You’ll also be able to check syntax that way, as a missing , : ; or } can do some pretty strange things.
Break stuff on purpose. Seeing what happens when you change one element you know you can switch back gives you +5 experience points. Use it wisely.
yep that’s it, as C++ coder I have a different idea of debugging than a PHP coder. Even if with PHP the tracing is a much more used strategy, I can’t see a specific support on WPMU/BP code. I have installed the FirePHP and WPMU FirePHP plugin to see if it can helps, but I’m just surprised about the fact that WPMU itself is not verbose on errors enough.
If the login process gets an invalid cookie for not any apparent valid reason, it should at least tell me what is going wrong, not just redirecting me again on the login page.
I have all the PHP debug settings enabled of course, but still I can’t see any specific output that gives me some hints.
In practice if I want to know I have to bother you or debug.
The truth is that I doesn’t know PHP enough to understand some mechanisms, even if something is missed is still missed IMHO.
Anyway about my fist post maybe the question now can be clearer: How do you debug WPMU code?
Do you use a real debugger with breakpoinst like PHPed does? Do you use Fire PHP to trace out output? What else?
Thanks for this as I didn’t know about WP FirePHP. It seems like it should help a great deal and maybe we can get such a plugin for BP.
Yep, I haven’t been successful yet, but once I will make it working, I will post again.
In the meanwhile you can also give a look to xdebug, that is a server side remote debugger. It needs a IDE and it looks like most of the PHP IDE supports it more or less.
I noticed that even Notepad++ has got a xdebug plugin, I’m going to test it soon.
“but I’m just surprised about the fact that WPMU itself is not verbose on errors enough.”
Because they’re disabled. Search around for wp_debug=true in the config file.
Thanks! Now it’s much better!
at least I received:
Warning: Cannot modify header information – headers already sent by (output started at D:xampphtdocsgpiwp-login.php:463) in D:xampphtdocsgpiwp-includespluggable.php on line 665
Warning: Cannot modify header information – headers already sent by (output started at D:xampphtdocsgpiwp-login.php:463) in D:xampphtdocsgpiwp-includespluggable.php on line 666
Warning: Cannot modify header information – headers already sent by (output started at D:xampphtdocsgpiwp-login.php:463) in D:xampphtdocsgpiwp-includespluggable.php on line 667
Warning: Cannot modify header information – headers already sent by (output started at D:xampphtdocsgpiwp-login.php:463) in D:xampphtdocsgpiwp-includespluggable.php on line 868
no clue yet, but it’s what I was looking for : )
- The topic ‘Hints to debug’ is closed to new replies.