Hello everyone,
While I am absolutely fascinated with VS.PHP (it absolutely tops overkill IDEs like Zend Studio in my opinion) debugging got quite annoying recently. The debugging seems to launch slower with every time I debug, and it sometimes happens that i'll have to wait up to 20 seconds to receive response from the "Web Sever" which just is the local server.
I know this can't really be due to my hardware since I have a very up to date pc.
I am not sure if it possible to optimize the debugging process in terms of faster initialization times. As far as I understand, it launches the webserver only once a debugging command comes in. Would it be possible at all to have an option to keep the webserver on running, and basically just refresh the site when actually debugging from VS, so the waiting would be reduced?
Thinking in shorter terms: I have my own local apache running for development purposes. If I would "remote" debug on that local server, would that increase the speeds at all? I am not quite sure yet how to set up remote debugging, but if it would increase the speed I would definitely try to do that.
Thanks for your help as always,
Max
juanc says:
Max,
Thanks for the feedback.
When did you start experiencing the slow down? Is it with XDebug, DBG or both?
You can enable either one on your local server. The built-in engine is only there for convenience.
One thing we changed in 2.6 was moving from an apache sapi module to a cgi module for stability reasons. But I doubt that would be the reason. This could be a network issue, but I'm just guessing...
Juan
Phosphorblind says:
Hi,
Thanks for the fast response. I experience the slow down with XDebug only, DBG seems to perform quite ok (about 8 seconds until response), however does not seem to support PHP5 very well. I can pretty much rule out a network issue, since it is constantly slow, in all sorts of situations and times.
I think I will try setting up remote debugging. I will post here in case of troubles setting that up, and let you know if it is any faster.
Thanks,
Max
Phosphorblind says:
OK I set up remote debugging and it loads internet explorer and the website very fast. I however can't seem to get breakpoints / watch list / output ... windows in visual studio to work.
I read the article about remote debugging, and in my opinion it should work. Basically my project is saved on the local web server, and I am working in the web server directory with visual studio directly.
So basically my whole PHP project is located at C:\Server\www\local.dev\public_html\personal_projects\ZFTryout
the folder public_html is the root of my server
The start page is set to http://local.dev/personal_projects/ZFTryout/index.php
So they should be mapped perfectly, since there is only one copy.
I don't really know what I am doing wrong here, so help would be much appreciated.
Thanks,
Max
juanc says:
What are your xdebug settings in the php.ini file?
Cama says:
Hi Juan
I am experiencing the same issue debugging a wordpress 2.8.x projects using vs.php (2.8.1) on windows XP.
The web server is the internal apache web server (running PHP 5) and I have tried XDEBUG and DGB with no change.
I tried experimenting with the .httpd.conf but upping the ThreadsPerChild made the web server crashing worse.
It is now set to:
ThreadsPerChild 1
MaxRequestsPerChild 50
Any ideas? Do you need me to send a log?
Cam
juanc says:
I'm trying to get a new XDebug build that's more stable.
One alternative is to run PHP in CGI mode instead of in-process. This is a setting in the advanced debug settings.
Other than that, you can run your application on a linux server, XDebug does not seem to have issues there...
bitGrok says:
I'm having the same issue.
VS.Php 2.7 for Visual Studio 2005 version 2,7,5,6034.
Visual Studio has all the latest updates.
Windows 7, all updates as well.
When debugging, Apache frequently crashes. When I do get it going, I'm waiting sometimes up to a minute for the page to load. As you can imagine, this is extremely frustrating.
I am using all the defaults for debugging. I've tried many combination's of settings, but they either don't work or give the same results.
This is an issue that needs to be addressed quickly. I can provide any other information you need.
Steve
bricel says:
With both Xdebug and DBG ,
VS.Php 2.7 for Visual Studio 2008 version 2,7,5,6034.
on Windows 7.
The problem started since last VS php update
Thanks
juanc says:
this is because Apache has one thread. You can modify httpd-template.conf to have more threads. That will solve that problem but it may cause xdebug to crash :(
bricel says:
This fixed the issue.
I edited the file c:\Program Files\Jcx.Software\VS.Php\2008\httpd-template.conf
changed value ThreadsPerChild to : ThreadsPerChild 10
bitGrok says:
I can confirm that increasing the number of apache threads addresses this issue. Thanks.
juanc says:
I updated the official version so it has 10 threads again.
It also fixes some auto formatting issues.
Give it a try and please let me know how it works for you.
Thanks,
Juan