Welcome Guest, Not a member yet? Register   Sign In
Debugging CI with Zend Studio 9 Debugger
#2

[eluser]CroNiX[/eluser]
In your browser Zend debugger plugin, go to the settings and uncheck "Break on First Line". This will stop it from breaking on the first line of index.php and instead stop wherever your first breakpoint is.

Also, check "Debug local copy if available" if it isn't.

I assume you know how to set/unset a breakpoint by double clicking on a line number, or to set a variable breakpoint by right clicking a breakpoint and going to breakpoint properties where you can set the conditional break statement (like when $x = 50).

Debugging CI is a bit harder than other frameworks due to the singleton. For instance, you can't set a breakpoint directly in a model or view and have the debugger stop there. Views get included, so you can't step through them. Basically, if you want to step through a models code, you need to set a breakpoint in the CONTROLLER, on the line just before the call to the models method. Then step into the model. If you have any breakpoints set in the model it will then use them, but if you just set a breakpoint in your model and try to debug, it will skip over it and never break in the model.

I haven't seen that error you are seeing when I try to debug, so I can't suggest anything there. It might be because you are trying to trigger the debugger from within Zend Studio. Try setting the breakpoint, but trigger the debugger from your browser using the Zend Studio plugin.

You can also debug agax calls. Set your breakpoint and visit the page in your browser. In the Zend Studio browser plugin, choose "next page" and then submit your ajax form (or whatever it is) and then it will start debugging. Again, just set your initial breakpoint in the controller.

Hope some of that helps.


Messages In This Thread
Debugging CI with Zend Studio 9 Debugger - by El Forum - 07-14-2012, 10:10 AM
Debugging CI with Zend Studio 9 Debugger - by El Forum - 07-14-2012, 11:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB