Gazley Posted March 13, 2016 Share Posted March 13, 2016 Hi there, Just started with PW3 and building out my site. I used PHPStorm & XDebug just fine with PW2.7. If I run my PW3 site without any debugging turned on, the (very) basic homepage renders fine. If I turn on Xdebug and set a breakpoint or two, all is fine until I get into PriocessWire::buildConfig() at the line that news up a Config() instance ) line #604. $config = new Config(); When I step through that line or execute it in the console, the system acts as though it can't find the Config class. In my php error log file, I get entries like: [13-Mar-2016 21:34:54 Europe/Berlin] PHP Fatal error: Class 'ProcessWire\WireDebugInfo' not found in /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/Wire.php on line 1174 [13-Mar-2016 21:34:54 Europe/Berlin] PHP Stack trace: [13-Mar-2016 21:34:54 Europe/Berlin] PHP 1. {main}() /Applications/MAMP/htdocs/hsa/ProcessWire/index.php:0 [13-Mar-2016 21:34:54 Europe/Berlin] PHP 2. ProcessWire\ProcessWire::buildConfig($rootPath = *uninitialized*, $rootURL = *uninitialized*) /Applications/MAMP/htdocs/hsa/ProcessWire/index.php:33 [13-Mar-2016 21:34:54 Europe/Berlin] PHP 3. ProcessWire\WireData->__debugInfo() /Applications/MAMP/htdocs/hsa/ProcessWire/index.php:605[13-Mar-2016 21:34:54 Europe/Berlin] PHP 4. ProcessWire\Wire->__debugInfo() /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/WireData.php:415 It's all a bit weird. It runs without the Xdebug listening for breakpoints but turn Xdebug on and it all goes pearshaped! Any ideas/thoughts/suggestions very welcome. Cheers! Link to comment Share on other sites More sharing options...
abdus Posted April 11, 2016 Share Posted April 11, 2016 Problem originates from the use of __debugInfo() magic method that comes with v5.6. Try using PHP 5.5. Processwire + xDebug doesn't play well with PHP >= v5.6. 4 Link to comment Share on other sites More sharing options...
Gazley Posted April 11, 2016 Author Share Posted April 11, 2016 Hi @adbus - many thanks for the heads-up. I googled around and it seems that there was some kind of xdebug issue with __debugInfo() that was fixed in 2014 and there seem to be others recorded quite recently that haven't been fixed as yet. I don't want to go backwards with respect to PHP version so, I'll just have to put up with whatever issues arise on the odd occasions that they do. Again, I really appreciate you taking the time to point this out! 1 Link to comment Share on other sites More sharing options...
abdus Posted April 12, 2016 Share Posted April 12, 2016 I use PHP5.5 on my local dev environment, but 7.0 on production. It's a small sacrifice for the convenience of using step-by-step debugger instead of echo and var_dump(). It sucks that PW doesn't work well, but until it gets fixed, I'll have to settle for v5.5. 1 Link to comment Share on other sites More sharing options...
Gazley Posted April 12, 2016 Author Share Posted April 12, 2016 I use MAMP locally and the non-Pro version offers 5.6 and 7.00 only. You make a good point about the small trade-off. It's definitely worth considering! Link to comment Share on other sites More sharing options...
Bill C Posted June 19, 2016 Share Posted June 19, 2016 I use Wamp at the moment. I added php 5.5.36 to my set up today. I had added php 7 in April. I now have 3 versions of php in my setup lol. I found this write up to be helpful How to Upgrade PHP in WAMP Xdebug definitely seems to be OK on 5.5 as has been said. I can only speak for Visual Studio Code and Netbeans, though. I am going to post the php.ini settings I used for 5.5. It might save someone a little time. I am using the thread safe version, 64 bit. With Windows it seems that I needed a version of php that came with the php5apache2_4.dll. The non-thread safe version did not include it in the zip. OH, and when you're updating php.ini on Wamp, remember to also save it as phpForApache.ini !! It's mentioned in the article I provided the link to. ------------------------------------------------------------------------------------------ ; XDEBUG Extension zend_extension = "c:/wamp64/bin/php/php5.5.36/zend_ext/php_xdebug-2.4.0-5.5-vc11-x86_64.dll" ; [xdebug] xdebug.remote_handler="dbgp" xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_host=127.0.0.1 xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = "c:/wamp64/tmp" xdebug.show_local_vars=0 xdebug.remote_port=9000 Link to comment Share on other sites More sharing options...
FrancisChung Posted September 23, 2016 Share Posted September 23, 2016 Hi @abdus and @Gazley, I was wondering if you guys managed to get XDebug (and PHPStorm) working with PHP 5.6? Or should I not bother and go straight to v7.0? Link to comment Share on other sites More sharing options...
FrancisChung Posted December 12, 2016 Share Posted December 12, 2016 There seems to be an odd issue with XDebug and Processwire. I have raised this bug report.https://github.com/processwire/processwire-issues/issues/114 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now