This has been pissing me off for about 3 hours, just worked it out. So before you put a gun to your head, try this. When Eclipse starts, choose a new workspace, and setup your project again!
After I did this my break points got hit again!
My break points were working fine, then all-of-a-sudden they stopped working.
I Tried:
removing all break points
cleaning project
re installing eclipse
NONE of the above worked for me!
BTW I am using window 7.
I hope this information saves someone's life!
BTW: here are the steps you take to setup, centos 7 with xdebug and vmwere, with a window 7 client with eclipse:
download vmwere
downlaod and setup vmwere with: CentOS-7-x86_64-Everything-1511.iso
disable Firewall
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
connect via ftp
ifconfig to find out Ip
ifconfig
eno16777736: flags=4163 mtu 1500
inet 192.168.170.128 netmask 255.255.255.0 broadcast 192.168.170.255
inet6 fe80::20c:29ff:fec4:b8ca prefixlen 64 scopeid 0x20
ether 00:0c:29:c4:b8:ca txqueuelen 1000 (Ethernet)
RX packets 254 bytes 20919 (20.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 95 bytes 10225 (9.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
192.168.170.128 is the ip
setup LAMP
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-release
yum -y install mariadb-server mariadb
systemctl start mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
yum -y install httpd
systemctl start httpd.service
systemctl enable httpd.service
yum -y install php
service httpd restart
yum -y install php-mysql
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring
php-snmp php-soap curl curl-devel
service httpd restart
yum install phpMyAdmin
on windows open cmd, type ipconfig
find
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . : localdomain
Link-local IPv6 Address . . . . . : fe80::94b8:9e5c:c772:3d47%19
IPv4 Address. . . . . . . . . . . : 192.168.170.1 [ this is the widnows ip to allow ]
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway .
in /etc/httpd/conf.d/phpMyAdmin.conf change:
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
to:
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip [ WINDOWS IP TO ALLOW GOES HERE ]
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from [ WINDOWS IP TO ALLOW GOES HERE ]
Allow from ::1
</IfModule>
service httpd restart
change $cfg['Servers'][$i]['auth_type'] = 'cookie'; to $cfg['Servers'][$i]
['auth_type'] = 'http';
service httpd restart
/etc/selinux/config change
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=enforcing
SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are
protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted
to
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=disabled
SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are
protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted
reboot centos
IN WINDOWS POINT BROWSER TO: http://192.168.170.128/phpmyadmin, should be all good
copy website to: /var/www/html/[ WEBSITE NAME ]
chmod -R 777 html
in etc/httpd/ add ( this allows permalinks to work with post name )
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
yum install php-devel ( to allow pipsize )
make php file with: and copy to website root run it and copy the htl into https://xdebug.org/wizard.php then click analysis source button
https://xdebug.org/wizard.php will give Instructions like this: ( follow them )
......
Download xdebug-2.4.1.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.4.1.tgz
Run: cd xdebug-2.4.1
Run: phpize (See the FAQ if you don't have phpize.
Run: ./configure
Run: make
Run: cp modules/xdebug.so /usr/lib64/php/modules
Edit /etc/php.ini and add the lines
zend_extension = /usr/lib64/php/modules/xdebug.so
xdebug.remote_enable=On
xdebug.remote_host=192.168.170.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
.....
service httpd restart
run file and you should see an XDebug section, if so the
server is ready to go!
Download Eclipse Neon
File > Open projects from file system
Finish ( and wait )
Window Preferences > php > servers > new
go to eclipse main window > click drop down arrow beside the bug icon > debug configerations
window > prespective > open prespective > php
Put a break point in the php file that gets hit first ( by clicking on the vertial scrollbar on a line of code )
Finally click the debug icon in eclipse, and your break point should get hit ( the line of code with the break point on it will go green )
Open up Centos 7 on Vemware to the world
Change VMeere network setting to bridged
Add a rule to router to port foward any traffic to the vmweare IP that cetnos is running on
Add an inbound rule to the widnows firewall allowing http
PS: I dont have time to check my gammer and speiing, deal with it