ajoo Posted February 9, 2017 Share Posted February 9, 2017 (edited) Hi all, I configured my localhost to work with Xdebug and then installed the plugins to work with note++. Everything worked fine and I got the sample two line program to work from the terminal as well as from a browser (chrome) by appending "?XDEBUG_SESSION_START=xyz" after the URL. It worked fine for small programs but for my multi-page application, the appended bit simply disappeared. I guess that's because of jumping to pages on menu clicks where the url is created depending upon the menu button being clicked. Code like : if(isset($_GET['menu_item'])) { $menu_item = fcheckPpage($_GET['menu_item']); switch ($menu_item) { case "menu1": require_once("/some/thing.php"); break; case "menu2": require_once("some/thingelse.php"); break; ... Then I tried the same on firefox by first installing the plugin for it which does not require any strings to be appended to the URL. That too got working but crashed each time at the very same place when it encountered the code shown above in the code box. These are the error messages that I got and It is clear that the the moment the application / program generated it's own url the link to the debugger is lost. Seems like a woeful limitation, I could try and append the XDEBUG... string to the end of each of the generated urls but that would not be a very pretty solution if that did work. If anyone has any suggestions or solutions or an alternative to this I will grateful. Thanks all. Edited February 9, 2017 by ajoo Quote Link to comment Share on other sites More sharing options...
ajoo Posted February 9, 2017 Author Share Posted February 9, 2017 Hi ! I found the issue. No xDebug has no limitation. It was a a configuration issue. I did not set an IDE KEY in the DBGP config. So if I set my IDE KEY to 'ide_key' then the String appended to the end of the URL should be XDEBUG_SESSION_STRING='ide_key'. That seems to fix it. Thanks all. Quote Link to comment Share on other sites More sharing options...
requinix Posted February 9, 2017 Share Posted February 9, 2017 It worked fine for small programs but for my multi-page application, the appended bit simply disappeared. I guess that's because of jumping to pages on menu clicks where the url is created depending upon the menu button being clicked.You only need the first URL to have that query string - it tells XDebug to begin the debugging session. If you lose the query string after, that's fine (and it's expected) and your debugging session will continue. So jump between pages to your heart's content. Quote Link to comment Share on other sites More sharing options...
ajoo Posted February 9, 2017 Author Share Posted February 9, 2017 Hi requinix, Yes you are right like I found out once the xDebug worked fine. Thanks for clarifying it yet again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.