phpED Debugging with SSH
Jan 11
Development Comments Off
If you are using the NuSphere PHP phpEd editor with integrated debugger, you may be running it over SSH as I am. One problem you may encounter is that during calls to DebugBreak(); (used, for example, when debugging AJAX calls), the server gets confused and tries to connect back to your local machine – presumably, this will be an epic FAIL (or you wouldn’t be port-forwarding in the first place!).
Here’s a quick fix:
$_SERVER["REMOTE_ADDR"] ='127.0.0.1';
DebugBreak();
By setting the remote address, the DebugBreak function call will then call the local machine, and appropriately have the connection port-forwarded over your SSH connection.
One additional thought … if anyone has (or can create) an updated version of the DBG bar for Chrome and/or Firefox, let me know. The ones I’ve tried don’t work with the latest version of the browsers. I’d be willing to consider financially sponsoring such a project.
RSS