How to debug Chrome in Android 5

I followed these instructions and it worked on my Sony Xperia Z3 running Android 5:

And you will first need to unlock the Developent configuration in Android, following this other instruction:

How to debug WordPress errors

First of all, WordPress provides debugging as an option. It is not activated by default. In order to make it work:

// Enable WP_DEBUG mode
define(‘WP_DEBUG’, true);

There are also ways of storing it into a file or not display it. Please have a look at the detailed options here:

If you would like to have a more powerful tool, that also shows the queries and other information, I recommend to use the plugin:

Debug Bar:

and Debug Bar Console:

Happy debugging!!

WordPress xmlrpc error 200

We wrote some days ago about a problem with xmlrpc.php in WordPress due to having WP_DEBUG active. Today I have discovered another issue that may prevent xmlrpc.php from working correctly.

This time the problem is that when trying to write with xmlrpc protocol, the response is an error 200. The issue discovered today had to do with the theme being used. This theme had a function defined that was causing some type of return that affected the usage of xmlrpc.

The result was that when loading the page /xmlrpc.php there was a redirection to one post. This was very strange. The normal response has to be:

XML-RPC server accepts POST requests only.

I could identify the problem when I compared the theme I was using with another one (take twentyten for example) where I was getting the correct response.

Since I knew that WordPress loads functions.php every time you load a page, I looked at it and, by trial and error, found that there was a function causing the problem. I wish there was more debugging information about it… but I have not been capable of having access to it.

Now I have put among my to-dos, the task of learning more about how to debug in PHP. I have quickly read through this promising post by IBM:

javascript: how to access the functions from the console

when you are programming and want to test a function of your code inside the console, can you call it directly?

the answer here:

If the function global scope then it should be fine. If it is inside a function, then it will not work. In my case, I am using $(document).ready ( { function ( …) }); to hold all the code so I cannot. Now I understand why.

Two possible solutions: 

– copy paste the function in the console – may not work..

– or enclose it in this code:

(function() {
    window.myFunction = myFunction;
    function myFunction() {

Enabling Apache logs in MAMP Pro

MAMP Pro uses a template to configure the apache configuration file. So you have to open MAMP  Pro and open templates apache, as described here

Then change the lines as explained here

and restart apache!

You will now be able to see the logs in real time using
tail -f /Applications/MAMP/logs/apache_access.log