Debug: exit code -1073741819

Hello,

I'm trying to debug my first PHP app. I have never debugged PHP before, so think of VERY SIMPLE TERMS. I'm not doing anything big and huge and complicated.

I have 15 lines of code and all it does is opens a DB on my localhost and read values from a table and displays it. There's really nothing to debug about this because the code works just fine, but I'm just trying learn how to debug in PHP.

I setup my PHP debug/config based on the documentation provided. I'm  using XDebug 2.2.0 which came with Wampserver 2.2. I've also downloaded the latest XDebug v2.2.1 and tried both versions. Php v5.4.3.

Basically when I run the debug session, I get a dialog box which says "CLI has stopped working" and I get the standard windows choice of closing the app or go online and find search for a solution (...yeah, right). Of course when I click "Close appplication" the app (PhpStorm) doesn't die and it continues to run just fine. However, in the console output I get: "Process finished with exit code -1073741819."

I can't find any information what that exit code means and why am I getting a "CLI has stopped working" error.

My XDebug config section in PHP.ini:


zend_extension = "D:/wamp/bin/php/php5.4.3/zend_ext/php_xdebug-2.2.1-5.4-vc9-nts-x86_64.dll"
[xdebug]
xdebug.remote_enable = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/wamp/tmp"

Anyone could lend me a hand with this? Thank you!


PhpStorm: 5.0.4
XDebug: 2.2.0 (and 2.2.1)
Php: 5.4.3
Win 7 x64

7 comments

Hi there,

"CLI has stopped working" means that PHP process has crashed (for whatever reason). You can try debugging line by line (starting from first line in your code) and see where it crashes.

But in any case -- it's unlikely to be PhpStrm issue -- extremely likely it's one of the extenions you have enabled in php.ini (quite possibly xdebug itself; e.g. incompatible with the rest of your PHP stuck etc).

For me some code runs just fine in normal mode (when just executing) but crashes when attemping to debug some lines (especially DB related).

Regarding xdebug version: definitely use 2.2.1 version -- 2.2.0 has quite a few stability issues. Just make sure that you have got correct build. The one which you have (php_xdebug-2.2.1-5.4-vc9-nts-x86_64.dll) is x64. Is your WAMP (Apache AND PHP) is x64 bit as well?


BTW -- WAMP server -- which one of these do you use (or maybe another one):

If one of those -- I do not see xdebug 2.2.0 with any of them.

0

Thanks for the quick reply! Yes, I figured it's probably not PhpStorm related, but I just can't find out what it might be.

Yes, my Wamp is 64bit (installer: wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe). That's under the label "WAMPSERVER (64 BITS & APACHE 2.4) 2.2E".

On the Wamp website, under the download options, the version number they list for XDebug is incorrect. I guess they labedl it incorrectly. It does say under the download label that "XDebug 2.1.2" but once you install the package, the dll version is 2.2.0 (php_xdebug-2.2.0-5.4-vc9-x86_64.dll).

With the 2.2.1 version, I get the same error, however.

0

BTW, I've setup my run/debug configuration using "PHP Built-in Web Server". Is that the one I'm supposed to use? Not really sure what are the differences, since there are a few listed.

0

Try x32 bit version then -- it may work better. I think I saw another post with WAMP x64 few eeks ago.. but it had completely different issue.

If still nothing -- try that another WAMP link (EasyPHP) -- different build, may work differently.

0

PHP 5.4 can run his own built in http server: http://www.php.net/manual/en/features.commandline.webserver.php

0

Thanks, I will try these suggestions.

However, why is it that I change my xdebug setting in the php.ini file to point to the new version (2.2.1), restart Wamp, and when I get a phpinfo(), under xdebug, it still shows 2.2.0?

----- UPDATE

Ok, never mind this. I found there are a few php.ini files. One of them is in the php directory and the other is in the apache directory. I was editing the one in the php directory, but apparently I need to edit the one in the apache directory. Hmmm....

0

Please sign in to leave a comment.