XF 2.2 Extension hints not working when attempting to debug

Feanor

Active member
I'm using Visual Studio Code with the PHP Intelephense and PHP Debug (xdebug) extensions.

extension_hint.php seems to be working fine while coding. No errors.

However, when attempting to debug, I get this error:
PHP Fatal error: Uncaught Error: Class "[addon id]\Pub\Controller\XFCP_Thread" not found in [addon path]/Pub/Controller/Thread.php:10
 
The extension_hint.php only exists for IDE auto-completion indexing, it is not loaded at all during runtime. At runtime, class extensions are set up by chaining together extensions using class_alias. You should be attaching to Xdebug by starting the IDE debugger and then making a request in your browser. In VSCode, make sure you create the debug configuration using "Listen for Xdebug" rather than "Launch currently open script".

Depending on your Xdebug configuration, you may need to send a special cookie with the request to start a debug session. There are browser extensions to help with this.

There are more comprehensive instructions in the developer documentation.
 
The extension_hint.php only exists for IDE auto-completion indexing, it is not loaded at all during runtime. At runtime, class extensions are set up by chaining together extensions using class_alias. You should be attaching to Xdebug by starting the IDE debugger and then making a request in your browser. In VSCode, make sure you create the debug configuration using "Listen for Xdebug" rather than "Launch currently open script".

Depending on your Xdebug configuration, you may need to send a special cookie with the request to start a debug session. There are browser extensions to help with this.

There are more comprehensive instructions in the developer documentation.
Thanks, that worked. After launch.json was created, I changed the port number there based on the xdebug details listed by phpinfo(). It started working without the browser extension.
 
Back
Top Bottom