Welcome Guest, Not a member yet? Register   Sign In
Zend Debugger and Codeigniter 2
#1

[eluser]vukasin0[/eluser]
Hi,


I'm using codeingiter v2.0.3.

Simple question:

Is it possible to debug codeigniter application with zend debugger ?

I'm using Zend Studio 9 and Eclipse Helios.

Thx,
Vukasin
#2

[eluser]CroNiX[/eluser]
Yes. Do you have the php module installed?
#3

[eluser]vukasin0[/eluser]
Hi,

Yes I have ZendDebbuger.so in place.

Is there any code modification required in Codeingniter?

//Vukasin

P.S.

Here is output for my php modules:


$ php -m
[PHP Modules]
ADOdb
apc
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
enchant
ereg
exif
ffmpeg
fileinfo
filter
ftp
gd
geoip
gettext
gmp
hash
iconv
imagick
imap
interbase
intl
json
lasso
ldap
libxml
mbstring
mcrypt
memcache
memcached
mhash
mysql
mysqli
openssl
pam_auth
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend Debugger
zip
zlib

[Zend Modules]
Zend Debugger
#4

[eluser]CroNiX[/eluser]
Not that I remember. You should just be able to set your break points and click "debug" on the browser plugin. Are you able to debug regular php?

Here's the debugger settings I'm using in php.ini on my dev machine:
Code:
[Zend]
zend_extension_ts = "C:/Apache/php/ext/ZendDebugger.dll"
zend_debugger.allow_hosts= 127.0.0.1, 192.168.1.100, 192.168.1.1/16
zend_debugger.expose_remotely=always
report_zend_debug = 1
#5

[eluser]Adrian Walls[/eluser]
Yes you can. But it depends on what version of PHP you are running. Should work will all versions <= 5.2 but if your running 5.3+ it needs to been running with thread safety disabled.
#6

[eluser]vukasin0[/eluser]
Ok - I'll need to check how to put "thread safety disabled."

I've found some info that it is not compatible with all web servers.

My setup is: Nginx 1.0.5 with php fpm 5.3.6 on Ubuntu Linux 11.10.

Currently if I debug controller it will debug only code inside controller but not in model called from controller.

I need to debug models mostly.

I'll be back soon with my findings.

Thx for pointing me in right direction.


//Vukasin
#7

[eluser]CroNiX[/eluser]
Is your breakpoint in the controller right before the model call and then step into the model call or is it in your model?
#8

[eluser]vukasin0[/eluser]
Question: Is your breakpoint in the controller right before the model call and then step into the model call?

++ Yes it is and if I step in model call it will point me in model - thx for hint Smile
++-- It is strange: I have brake point inside model too and right after debugger point me inside of model it will never stop on brake point but "step-over" line by line.



Question: or is it in your model?

++ If I put brake point inside of model only it will be ignored.



In both scenarios it will drive me through index.php (about 15 step-over) until stop on brake point inside of controller or brake out.


//Vukasin
#9

[eluser]CroNiX[/eluser]
[quote author="vukasin0" date="1337891316"]
In both scenarios it will drive me through index.php (about 15 step-over) until stop on brake point inside of controller or brake out.
[/quote]
You can disable that by going into the zend debugger browser plugin options and uncheck 'break on the first line'. Then it will only stop wherever your first actual set breakpoint is.
#10

[eluser]vukasin0[/eluser]
yep - that solved issue on controller side but in model it is still line by line (after step-in model).

Here is a bit late - I'll continue tomorrow.

CroNiX - thank you soo much for you help.


//Vukasin

P.S.
Best Framework with best community !!!!!




Theme © iAndrew 2016 - Forum software by © MyBB