Setting up XDebug with XAMPP and WeBuilder

Discuss general web development questions. Help others and get help from others.

Moderator: kfury77

Setting up XDebug with XAMPP and WeBuilder

Postby pmk65 » Mon Feb 20, 2017 6:40 pm

This is the setup I use in combination with XAMPP.

1 ) In your PHP.INI, add the following lines (You might need to change the xampp path if it's not installed on C:/):

Code: Select all
[Zend]
zend_extension="c:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey=default
xdebug.remote_log="c:\xampp\tmp\xdebug.log"
xdebug.show_exception_trace=0
xdebug.show_local_vars=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.profiler_enable=0
xdebug.profiler_output_dir="c:\xampp\tmp"


Do NOT use "zend_extension_ts" as described here: http://help.blumentals.net/webuilder/php/dbgconfig.htm
(This setting is obsolete in PHP v5.3+ and no longer have any effect)


2 ) After modifying PHP.INI, restart the Apache server.
3 ) In WeBuilder open Options->Preferences.
4 ) Edit the "Preview->Mappings" section.
5 ) Add a mapping that maps your XAMPP "htdocs" folder to localhost, like this:

Image

6 ) Edit the "Preview->Script Preview" section.
7 ) Restart WeBuilder.


To test if it works, create a simple PHP script like this, and add a breakpoint:
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Setting up XDebug with XAMPP and WeBuilder

Postby Aivars » Wed Apr 19, 2017 7:14 pm

Thanks, I updated online help accordingly. One thing according to my tests - you do not have to uncheck built-in webserver, as Mappings has higher priority and thus your locally installed webserver will be used when previewing any file saved in web document root, meanwhile built-in webserver will be used to preview files saved anywhere else and unsaved files.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Setting up XDebug with XAMPP and WeBuilder

Postby pety » Wed Apr 19, 2017 9:57 pm

Thanks for tutorial pmk65
pety
 
Posts: 187
Joined: Fri Mar 02, 2012 7:17 pm

Re: Setting up XDebug with XAMPP and WeBuilder

Postby pmk65 » Thu Apr 20, 2017 6:51 pm

Aivars wrote:Thanks, I updated online help accordingly. One thing according to my tests - you do not have to uncheck built-in webserver, as Mappings has higher priority and thus your locally installed webserver will be used when previewing any file saved in web document root, meanwhile built-in webserver will be used to preview files saved anywhere else and unsaved files.


Good to know. I always assumed that you had to turn off the build-in server in order to use a real server. :? :oops:
It might be a good idea to display some indication on WHICH server is used. Like expanding the already present "Generate preview file" text with additional server info.

I.e. "Generate preview file - using build-in webserver" and "Generate preview file - using external webserver"
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark


Return to Web Developer Talk

Who is online

Users browsing this forum: No registered users and 12 guests