1) local or remote? I understand that the best practice for debugging is to have a local version of your website, but sometimes to make a local version of your current website can be very time consuming, especially when the site has been published and you just want do a few tweaks or fix some minor issues.
2) for the reason I mentioned above, I usually debug directly online. Here's a typical scenario I often encounter: The front end is reporting an error regarding a php file, I open the file and look at the line in question, it's in a method of a class. Then I
var_dump related variables to see what's wrong, more than often it doesn't help, then I dive further into the function only to find out that the variables in question are related to one of the function's parameter. To know what exactly the parameter is, I need to find out where this function is invoked. Here is where I usually got stuck, I have to download the extension or even the whole website to local and do a in-text search for the function in all php files. Often there are scores of invocation, I have to try them one by one to see which one is causing problem. More than often this will lead to another function which I need to repeat the above process again.... This procedure is very time consuming and I often got frustrated and confused. Is this what everyone goes through?
So I am wondering how a sophisticated joomla developer would debug his site, what's the common practice for this? I was reading joomla documentations for debugging and and still working on configure a eclipse/xdebug environment, but I think the above questions still remain.