› Forums › Personal Topics › What I’m Up To › PHP dev
This topic contains 1 reply, has 1 voice, and was last updated by
Josh November 20, 2016 at 2:04 am.
-
AuthorPosts
-
November 20, 2016 at 2:04 am #296

JoshSwitching for the moment to NetBeans…overall, it’s a little smoother & easier to do things, though not as ultimatelly configurable as Eclipse. There is no real barrier to using both. Xebug seems to be the PHP debugger that everyone uses now. Went to their page, followed their instructions, and got it working with NetBeans (should be easy with Eclipse to). The key is understanding how it actually works. It’s mainly/partly an extension to PHP with a C plugin that is loaded dynamically…it intercepts execution and sets itself up for remote control. To interact with an IDE, it uses a socket to connect to a “remote host” which is most commonly “localhost” on a given port which is most commonly 9000. It has a config setting to make nice with different IDEs such as NetBeans, Eclipse, PHPStorm, some plugin for Atom that are listening for it. So getting it working means 1) plugin installed, 2) a bunch of settings in php.ini telling php what is going on with the extension (e.g. where to find it) and telling Xdebug where to remote connect and what IDE to make nice with. It would make sense for IDEs to install, set this up themselves, & run it with a plugin. I guess they don’t because there are multiple different PHP.ini in different locations on a given machine, in priority/override ordering and they are global, configuring different things. So the IDE would need to dynamically merge the settings with its local copy. I think that is actually the way it *should* work.
There is a jit debugging option with XDebug. S maybe there is a good way to make the unit test runner remotely control the IDE so it could be triggered at a suitable position when a test failure occurs??
-
AuthorPosts
You must be logged in to reply to this topic.