Run debug in phpStorm to step through XenForo

LPH

Well-known member
I read a post suggesting the best way to learn XF code is to run debug and step it through XenForo.

Does anyone have a link to a good tutorial on how to setup phpStorm with XenForo so debug can show what is happening in XF? Right now debug opens a blank browser and so the configuration must not be set properly.

Maybe someone has a better way to go through the code to learn how to do these things:

Return absolute url instead of relative path
Create new templates / modify templates
Create a new profile page with tab and links
Create a new tab next to the "new post" "new showcase" "new media" ...
Create a permissions options page
Add a table for an add-on
Write an XF thread into an external database for a different app.
Start XF externally without using relative path....

All done externally from XF but once my bridge is active then I have access to all XF methods and classes.

Some of the above are described in other add-ons and tutorials here but specifically I'd like to learn the power behind the phpStorm tool to debug XF code.

Or is that not even the right way to ask about how to learn the XF way ;)
 
After a little bit of reading and watching videos, I figured out a way to get the Chrome xdebug extension and PhpStorm to connect, and set break points to get information into the debugger. Now it's taking the time to interpret what is being returned.

Here is my little video:

Note: I forgot to show that I clicked on the PhpStorm listening icon (phone icon) to start PhpStorm listening to the Chrome browser.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Yes, the best I've seen it setup is to use the chrome xdebug extension, and turn on debugging for your licalhost installation.

You'll also have to tell phpstorm to listen for xdebug connections, by clicking the phone icon. Then you can set breakpoints in phpstorm to any line of code in XenForo to analyze variables, code, session data, etc.
 
Back
Top Bottom