PHP Code Intel Autocomplete doesn't work

I’m running Komodo IDE 9.3.1 on Xubuntu 14.04.

When I edit a PHP file on it’s own, autocompletion and code intel works fine.

When I edit a PHP file in a project, autocompletion does not work at all.

I’ve reset the code intel DB.
I’ve double-checked to make sure the directory I’m working with is in the Languages > PHP > Directories listing

The only error I see in the logs related to code intel are:
[WARNING] codeintel.langintel: don't know how to get cb detail for 'element' elem

This problem was also there in version 9.2 (I upgraded today).

Any help on how to fix this please?

Thanks in advance,
-Andreas

Sometimes it takes a while for codeintel to index a particularly large project, but perhaps that’s not the problem you’re experiencing.

When you get the chance, please go to your ~/.komodoide/9.3/ folder and post the contents of your codeintel.log when your codeintel is not working. That may help us isolate the issue. There’s not much in your e-mail to go on.

Here’s the content of ~/komodoide/9.3/codeintel.log:

WARNING:codeintel.langintel:don't know how to get cb detail for 'element' elem WARNING:codeintel.langintel:don't know how to get cb detail for 'element' elem WARNING:codeintel.langintel:don't know how to get cb detail for 'element' elem WARNING:codeintel.langintel:don't know how to get cb detail for 'element' elem WARNING:codeintel.langintel:don't know how to get cb detail for 'element' elem WARNING:codeintel.langintel:don't know how to get cb detail for 'element' elem WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/www2/mail/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/www2/flow/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/www2/flow/html/inc/mpdf/mpdf.php' has size greater than 1MB (1336667) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/www1/mail/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/www1/flow/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/www1/flow/html/inc/mpdf/mpdf.php' has size greater than 1MB (1336667) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/dev/mail/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/dev/flow/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918x/dev/flow/html/inc/mpdf/mpdf.php' has size greater than 1MB (1336667) /home/andreas/Komodo-IDE-9/lib/mozilla/python/komodo/textinfo.py:697: ChardetImportWarning: no chardet module to aid in guessing encoding ChardetImportWarning) WARNING:codeintel.manager:File u'/home/andreas/PMPF/20150918/www2/mail/html/admin/crud/phpmyadmin/libraries/tcpdf/tcpdf.php' has size greater than 1MB (1050309)

Hmmm. I think I got it to work now. Not 100% sure yet, but initial tests are positive.

I noticed in all project preferences, that the Debug Session Startup Directory was set to my home folder:

I changed this to the actual code folder:

And now code completion and hinting seems to be working fine:

That doesn’t sound right. That shouldn’t effect code intel.

Where is your project file saved? Is it in your project root or is it /home/andreas?

If your project file isn’t saved in your project root, you should add it to Project Properties > Languages > PHP: Additional Directories.

  • Carey

My project file is saved in my home folder.

However, changing the Debug Session Startup Directory to the code folder (or alternatively, changing the Debug Session Startup Directory away from my home folder) seems to have fixed the issue. I have confirmed this for a few projects now.

I highly recommend you do the above. That is where you’re supposed to add code intel folders.

You’ve just gotten lucky by setting it in the debug field.

  • Carey

Or you could just change your “Project Base Directory”, this would effectively mean your project itself lives in a different location than your project file. You can change this setting under Project Preferences.