nov21 — 2012-11-28T10:22:46-05:00 — #1
I was wondering if anyone was familiar with this issue - I have at least a couple of projects/files where I can use xDebug to step through the code, but in all the others I've tested it on I just get the browser up and it says "Debug session terminated".
Let's take one of the files I failed to debug as an example, it's called Bridge.php. I went to project > PHP debugger and selected enable project specific settings, and then selected xDebug and applied it. Then when I attempted to debug it, the browser came up and the debug session was terminated right away. Now, when I look at the debug history, I notice that it says that the server debugger for Bridge.php is the Zend Debugger. I have no idea how this happens, since I've already changed the project settings, and also changed my preferences from Zend to xDebug.
Has anyone here encountered this before?
cpradio — 2012-11-28T10:28:23-05:00 — #2
I haven't used Eclipse in years, but maybe try closing the project after making the change and re-opening it? Maybe the value is being cached on the opening of the project?
nov21 — 2012-11-28T11:26:54-05:00 — #3
It might have something to do with that. I tried re-launching but no luck.
However - whenever I press F11 (debug) on a new file, it will give me a "Debug PHP Web Application" pop-up, asking for the launch url. The right path is in there by default. However when I relaunch and press F11 on the files that aren't working, I don't get that pop-up. So it might be some.. saved.. setting, but it isn't fixed by a re-launch.
nov21 — 2012-11-28T11:33:04-05:00 — #4
Fixed - I uhm, had to go to properties on the file, go to Run/Debug settings, and edit the existing launch configuration for the file. In there I selected xDebug, applied, clicked OK, applied again on the first screen, and clicked OK. Then it ran successfully.
nov21 — 2012-11-28T11:42:54-05:00 — #5
I have one related question though - if I want to see a code run that only runs if I click a button on my generated webpage, how can I do that?
cpradio — 2012-11-28T11:49:24-05:00 — #6
You would need to set a breakpoint on that particular code section, start the debugger, and run through your application, press the button and it should trigger your breakpoint.
nov21 — 2012-11-28T12:09:47-05:00 — #7
You might have just saved me countless hours trying to figure my issue out ^^