Dec 17, 2015

f Comment

[SOLVED] How to Change the URL for PHP Debugging in Eclipse IDE in SECONDS!

Amazon When you set the debug configuration in the Eclipse IDE trying to debug your PHP program, the URL field is grayed out and you cannot change the base URL. It is always set to localhost. However, sometimes you need to set the debugging base URL to something else. How do you change the URL for Eclipse PHP debugging with XDebug or Zend Debugger?

Solution

Follow these easy steps to modify the URL for PHP debugging in Eclipse.
1. Create and save a debug configuration called "test".

2. Exit Eclipse.

3. Open workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/test.launch with a text editor.

4. Change 

<stringattribute key="base_url" value="http://localhost/"/>

to

<stringattribute key="base_url" value="http://www.chtoen.com/"/>

Replace http://www.chtoen.com/ with whatver URL you so desire.

5. Start Eclipse.

6. Go straight to debugging your PHP application with the "test" debug configuration. Do NOT navigate to "Debug Configuration..." because "Debug Configuration..." window will reset your URL.
The need to change base URL arises when you, for example, are trying to debug Facebook API, which only recognizes your actual website's domain, not localhost.

Questions? Let me know!

Please leave a comment here!
One Minute Information - by Michael Wen
ADVERTISING WITH US - Direct your advertising requests to Michael