Solved

Debugging PHP with Netbeans

Posted on 2014-03-14
5
6,286 Views
Last Modified: 2014-03-21
Hello Experts,

I have PHP installed on a Windows 7/IIS 7.5. I also have Netbeans installed on the same machine and I am wondering how can I use it's debugging tools like Breakpoints, Variable Tracing, etc.?

Thank you,
0
Comment
Question by:APD_Toronto
5 Comments
 
LVL 62

Accepted Solution

by:
gheist earned 167 total points
ID: 39931150
Exlipse has it if it helps.
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 167 total points
ID: 39931158
You need to configure with "XDebug 2.0 or later" to do with netbeans.
Did you see this link? https://netbeans.org/kb/docs/php/debugging.html
0
 

Author Comment

by:APD_Toronto
ID: 39932987
Ok, since I am running IIS, using your link above I installed xDebugger 2.2.4 manually and confirmed that it is installed within phpInfo()

Now when I try to debug, I get the following error


Error Summary
HTTP Error 500.0 - Internal Server Error
C:\php\php-cgi.exe - The FastCGI process exceeded configured activity timeout
Detailed Error Information
Module      FastCgiModule
Notification      ExecuteRequestHandler
Handler      PHP_via_FastCGI
Error Code      0x80070102
Requested URL      http://localhost:80/phpBook/ex_starts/ch06_ex2/index.php?XDEBUG_SESSION_START=netbeans-xdebug
Physical Path      C:\inetpub\wwwroot\phpBook\ex_starts\ch06_ex2\index.php
Logon Method      Anonymous
Logon User      Anonymous

However, if I run without debugger, I run without any errors.
0
 
LVL 13

Assisted Solution

by:AielloJ
AielloJ earned 166 total points
ID: 39943310
APD_Toronto:

You have to have the xdebug section at the end of your php.ini file.  The one below should work.

[xdebug]
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"

Regards,
AielloJ
0
 

Author Comment

by:APD_Toronto
ID: 39944095
I added the above to my php.ini, except the last line I set it to "C:\inetpub\wwwroot" since I am not using WAMP.

The issue is the same, as well, I forgot to mention... when I restart the machine (not just IIS) and go to debug within Netbeans, my application opens in my browser, I enter my data and click "Submit", then both Netbeans and my browser hang, this where I expect netbeans to show me my variable values. However, when I close my browser and cancel Debug within Netbeans, then re-run Netbeans debug again, it just hangs without opening my browser.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question