Setting up xDebug with XAMPP on Windows
9 posts
• Page 1 of 1
Setting up xDebug with XAMPP on Windows
Hello,
I am using XAMPP and PHP Tools for Visual Studio in order to code in PHP. I already configured XAMPP to use xDebug and mod_rewrite. The web site looks OK when I copy everything into C:\xampp\htdocs and call "http://localhost:80". But when I start the solution from Visual Studio (2012) I get Error 310 (ERR_TOO_MANY_REDIRECTS).
The path which is used then is "http://localhost:81". What's wrong with XAMPP/xDebug/PHPTools and how can I fix this?
This is the section of php.ini which I changed:
If this is not enough information, I will provide more.
Greetings.
I am using XAMPP and PHP Tools for Visual Studio in order to code in PHP. I already configured XAMPP to use xDebug and mod_rewrite. The web site looks OK when I copy everything into C:\xampp\htdocs and call "http://localhost:80". But when I start the solution from Visual Studio (2012) I get Error 310 (ERR_TOO_MANY_REDIRECTS).
The path which is used then is "http://localhost:81". What's wrong with XAMPP/xDebug/PHPTools and how can I fix this?
This is the section of php.ini which I changed:
- Code: Select all
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "C:\xampp\tmp"
If this is not enough information, I will provide more.
Greetings.
- Devils Child
- Posts: 4
- Joined: April 10th, 2013, 12:06 pm
Re: Setting up xDebug with XAMPP on Windows
DC,
Is you project setup to use apache, or the built in debugger?
You can verify this by right clicking on the Project in the Solution Explorer of VS and selecting Properties from the context menu. If you want to use apache, you should have the Servers section set to Use Custom Web Server and set the server url to the location of your site.
Regards,
Scott
Is you project setup to use apache, or the built in debugger?
You can verify this by right clicking on the Project in the Solution Explorer of VS and selecting Properties from the context menu. If you want to use apache, you should have the Servers section set to Use Custom Web Server and set the server url to the location of your site.
Regards,
Scott
- codeowl
- Posts: 51
- Joined: February 10th, 2013, 10:05 am
Re: Setting up xDebug with XAMPP on Windows
I'm using the option "Use PHP built-in Web Server".
- Devils Child
- Posts: 4
- Joined: April 10th, 2013, 12:06 pm
Re: Setting up xDebug with XAMPP on Windows
Hi there,
Scott's right. Just change the settings as he said so PHP Tools will use your server instead of the PHP built-in server.
Thanks,
Miloslav
Scott's right. Just change the settings as he said so PHP Tools will use your server instead of the PHP built-in server.
Thanks,
Miloslav
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Setting up xDebug with XAMPP on Windows
Okay, I think I got it. However, the directory is empty as my project is not stored in C:\xampp\htdocs, but rather in a different directory. Do I have to manually set up the different directory in XAMPP?
- Devils Child
- Posts: 4
- Joined: April 10th, 2013, 12:06 pm
Re: Setting up xDebug with XAMPP on Windows
DC,
I use WAMP and here is my setup:
The WAMP root www dir for websites is:
C:\wamp\www
So I create a sub dir in there for my solution.
Then I have a sub dir inside that for each project.
C:\wamp\www\SolutionName\ProjectName\
I map the Use Custom Server setting the Project Properties in VS to:
http://localhost/SolutionName/ProjectName/
Then you can set the Start Action in the Project Properties to start with a specific page if you want. Even with sub dirs if you want, which is handy for testing, you just right click on a test page in the Solution Explorer and select Set As Startup File from the context menu, and then run the project to go directly there, and then change it back to your index later.
If you are working on an MVC type project you can use a .htaccess in the root of your website (project) dir, to configure the rewrite module in apache if you have it enabled, to get apache to route all requests for php files to your index.php
Hope that helps
Regards,
Scott (GC)
I use WAMP and here is my setup:
The WAMP root www dir for websites is:
C:\wamp\www
So I create a sub dir in there for my solution.
Then I have a sub dir inside that for each project.
C:\wamp\www\SolutionName\ProjectName\
I map the Use Custom Server setting the Project Properties in VS to:
http://localhost/SolutionName/ProjectName/
Then you can set the Start Action in the Project Properties to start with a specific page if you want. Even with sub dirs if you want, which is handy for testing, you just right click on a test page in the Solution Explorer and select Set As Startup File from the context menu, and then run the project to go directly there, and then change it back to your index later.
If you are working on an MVC type project you can use a .htaccess in the root of your website (project) dir, to configure the rewrite module in apache if you have it enabled, to get apache to route all requests for php files to your index.php
Hope that helps
Regards,
Scott (GC)
- codeowl
- Posts: 51
- Joined: February 10th, 2013, 10:05 am
Re: Setting up xDebug with XAMPP on Windows
Okay. I will take a look at WAMP and see if I can get it to work this way.
Thanks for your help.
Also I'd like to say, I really love PHP Tools. Great tool! Keep the good work on
Bye
Thanks for your help.
Also I'd like to say, I really love PHP Tools. Great tool! Keep the good work on
Bye
- Devils Child
- Posts: 4
- Joined: April 10th, 2013, 12:06 pm
Re: Setting up xDebug with XAMPP on Windows
Thank you so much, that means a lot to us!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Setting up xDebug with XAMPP on Windows
DC,
You may find some benefit in looking at this post:
viewtopic.php?f=21&t=991&p=4574&hilit=WAMP#p4581
It outlines the process I went through to get a WAMP environment setup for debugging with PHP Tools
Regards,
Scott
You may find some benefit in looking at this post:
viewtopic.php?f=21&t=991&p=4574&hilit=WAMP#p4581
It outlines the process I went through to get a WAMP environment setup for debugging with PHP Tools
Regards,
Scott
- codeowl
- Posts: 51
- Joined: February 10th, 2013, 10:05 am
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 111 guests