PHP not configured for debugging

Hi Everyone,

I’m a new and inexperienced user, sorry. It’s been a whole day as I was trying to fix this strange problem, which is probably my stupid mistake.
I’m using Komodo IDE 10, freshly installed. OS is Windows 10 Home 64-bit on my laptop (i7-6500U, 16GB). PHP version is 7.1.6, also 64-bit, installed upon IIS web server using FastCGI. PHP seams to work correctly, both in CLI, and web server.

I’ve created a simplest PHP program (one line, <?PHP echo "AAA"; ?> ) and tried to start a debugger. But the IDE keeps saying “PHP not configured for debugging”.
On the Preference pane, in Language/PHP settings, I’ve set all the paths – for my PHP interpreter, and php.ini locations (which is actually one and only, c:\php\7.1).

What could possibly go wrong? Please advice.

You have to install xdebug and configure php.ini to load and use it.
https://xdebug.org/wizard.php

This is only for remote debugging. If @mortal is getting “PHP not configured for debugging” as an error then he’s starting debugging from Komodo.

Usually that just means you haven’t selected an interpreter. Remove the php.ini config you added and make sure you’ve selected php.exe as the interpreter.

  • Carey

You have the xdebug bits in Komodo? Didn’t know that. Their said they selected the interpreter though.

[wow, that was real fast!]
Thanks! I downloaded/installed the xdebug, and the error is now gone. But there appears to be another one, related.
After the pane for the debugger configuration appears, according to the tutorial, I have to select “simulate CGI env”. But this option is grayed out, as well as the “use the CGI interpreter” one. Look:


How do I move through that?

There has to be the php-cgi.exe binary somewhere (probably in the same folder as the php.exe binary). I’m not sure where though, I haven’t used PHP on Windows.
I don’t know how Komodo PHP debugging settings handles CGI detection. @careyh may know :slight_smile:

@Defman and @mortal, Xdebug bits are shipped with Komodo in Komodoinstaldir\lib\support\php\debugging. If you’re starting debugging from Komodo then it will use the shipped Xdebug. Komodo creates and uses a php.ini file that it stores in your profile folder for this.

I also said to remove the php.ini supplied.

There isn’t enough information here so I can’t tell you why it’s working after you installed Xdebug somewhere else so I’ll just go with “Yay, it’s working!”.

Re CGI: You have to give Komodo a CGI interpreter in the prefs. php-cgi.exe is in the same folder as php.exe where ever you installed PHP.

  • Carey
1 Like

Probably because of the custom php.ini they selected (I’m sure on Windows the installer automatically adds everything to the php.ini config so it works without manual configuration).

I assume instead of php.exe? So Komodo will offer both CGI and CLI modes in the debugging window?

Yes. You can only supply one interpreter. I don’t know anything about how the PHP interpreters work. I assume php-cgi.exe can do both CGI and Non-CGI

  • Carey
1 Like

If you want to use CGI you should use remote debugging. The PHP interpreter you configure in Komodo is for running PHP scripts directly. I believe it’s also used for linting.

Thanks Carey, Defman, and Nathan.
I wish I could give you all the info, but the point is, I still don’t have a clear picture of how it should work. So I don’t know what info would be relevant. But I’ll try…

  1. Well – no, I didn’t know about the Komodo modified php.ini file in the user’s folder – my bad. After reading your messages, I copied it over, replacing the php.ini I modified before. Unfortunately – no, it didn’t help. I still had the CGI options grayed out.

  2. I tried to use php-cgi.exe as the designated interpreter. Oops! in that case it goes back to the initial state (read the tread title).

Guys, there must be a simple solution for that. Do not dig deep. Say something trivial. I’m in programming for long enough to get used to this: when entering some a new area, there will be stupid mistakes. The weekend is coming, I will continue Monday, gonna try it on another Windows 10 computer, and Fedora 25. In the mean time, I DO APPRECIATE any ideas. Thanks!

Hey Mortal,

In short concise steps what you need to debug PHP is:

  • PHP installed
  • Xdebug installed
  • Xdebug configured in your php.ini
  • Komodo pointed at both your PHP interpreter (php.exe) and your php.ini

The documentation explains each individual step in detail:

http://docs.komodoide.com/Manual/debugphp

My bad! I guess I should check my work. To use CGI in local debugging you’ll have to setup some custom variables for your debugging environment:
http://docs.komodoide.com/Manual/debugger#Debugging_Options_CGI_Environment

But don’t use CGI unless you have an explicit need for it.

3 posts were split to a new topic: Need help setting up PHP debugging

What warning? The documentation page should more or less have step-by-step instructions.