Net beans debugger on mac not working - php

my net beans debugger on my mac is not working and I am not sure why.
This is the php.ini file on my MAMP. Its located in my php5.6.2. folder.
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.6.2/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=8080
xdebug.remote_autostart=1
My local host is running on port 8080 so here are the changes I made in the netbeans preference.
I am not sure if the next picture should have that path name or should I change it to the path name of the file that my project folder is located in ??
So other than this when I run the debugger it shows
http://localhost/pocketAllowence/index.php?XDEBUG_SESSION_START=netbeans-xdebug
It doesnt show localhost:8080 and then the rest. So not sure what to do to fix it.

Related

PHP: Xdebug access denied exit with code 0

I have set the PHP project on Mac with XAMPP and installed Xdebug there, but on my PhpStorm I get:
I did not manage to find anything on the web.
My php.ini
[xdebug]
;zend_extension=xdebug.so
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9002
xdebug.remote_log="/mnt/log/xdebug.log"
xdebug.remote_autostart=1
xdebug.idekey=phpstorm
xdebug.remote_mode = req
I might be coming late to the party, but make sure XDebug has Write access to the folder, let alone if you're using Docker.
If it's local, then just out of investigation try:
chmod 777 /mnt/log/xdebug.log
However, I'd rather choose to state a folder for the logging over a file.
If it's running within Docker, then "chmod" the actual mounted folder instead.

Debug PHP With Xdebug in Netbeans and via FTP

I have a PHP application that runs on a Debian server where I've installed apache 2.2.4 and xdebug.
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=192.168.0.2
xdebug.remote_port=9000
All the PHP files are saved on this server. The Server IP is : 192.168.0.2
The problem is that I'm opening the PHP project via FTP with Netbeans on a Windows 7 environment where apache is NOT installed!
Is it possible to debug in this scenario and does someone have any links for direction how to configure this scenario?
Please any help would be appreciated.
Thanks in Advance
Now i found a solution.
These links helped me:
http://wiki.netbeans.org/HowToConfigureXDebug
http://www.google.de/?gws_rd=ssl#q=php+netbeans+xdebug+configuration
The xdebug.ini i modified like this:
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.idekey=netbeans-xdebug
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=192.168.0.103
xdebug.remote_port=9001
The IP adress 103 is the adress of my local machine and i had to add the idekey to the ini.

Xdebug installed on Mac Native apache

I am trying to get XDEBUG up and going but having trouble getting the cookie to show. Below is what is put in my php.ini file. I restarted apache. I did a phpinfo() call and I do see xdebug enabled and the settings set. But when I do a localhost/?XDEBUG_SESSION_START=1 I am expecting to see a Cookie set to 1 in my browser right ?
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"
when I run php -m I do not see it but I do see it in phpinfo
couldnt figure the exact answer but I went and downloaded the php.ini.default file from repo and set the following in the php ini
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.idekey=foo
xdebug.profiler_enable=On
and it worked. could of been because of remote host. who knows. it worked. this is the bare minimum configurations for mac and this is if your going by the follwing installations for xdebug on mac
http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html

Netbeans - XDebug Debugging

I have setup a new dev environment using windows for the first time. I have WAMP installed and I am using netbeans as my IDE and have XDebug installed and reference in my php.ini file.
; XDEBUG Extension
zend_extension = "c:/wamp/bin/php/php5.4.12/zend_ext/php_xdebug-2.2.3-5.4-vc9-x86_64.dll"
which points to my xdebug.dll file.
When I try to debug within netbeans however, it is not stopping on any of my breakpoints. Any ideas of how to get it correctly debug by stopping at my breakpoints? Also just to verify that i am going to the page in question with my firefox browser so its not that I am not running the code
I added the following to my php.ini file and now debugging is stopping on my breakpoints in netbeans
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

MAMP xdebug URL doesn't 'construct' localhost:8888 using Netbeans

What I'm running:
Mac OSX 10.6.8
MAMP 2.0.5
Netbeans 7.0.1
current settings in php.ini
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
Looks like my setup for xdebug in the php.ini file are all right in that my webpage shows php errors and notices in the typical orange table.
But when I click the debug button in Netbeans, it generates a URL that starts with http://localhost/sitename/XDEBUGSESSIONblabla instead of http://localhost:8888/sitename/XDEBUGSESSIONblabla
In the php.ini file, I tried the setting
xdebug.remote_host=localhost
as well as
xdebug.remote_host=localhost:8888
I commented out all the zend variables in the php.ini file, but not the zend_extension below [xdebug] i.e. the one that says: zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
There is also [xcache-common] - section a little above the [xdebug] section in the php.ini file that also has a rule about the zend_optimizer that I left uncommented because it doesn't belong to the [Zend] section of the php.ini file.
On a sidenote: I can't actually find any [Zend] section in my php.ini file but I saw it mentioned in the tutorials I'm trying to follow:
Here
and
Here
Putting :8888 after localhost in the Netbeans project URL settings a second time did the trick. So it means that after the project was being created, right clicking the project folder and then in the dialogue box under 'Run Configuration' the third field from the top says 'Project URL'. That's where you can change it after project creation.

Categories