Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Debugging PHP with Netbeans

Posted on 2014-03-14
5
Medium Priority
?
6,347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 62

Accepted Solution

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

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 668 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 664 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

719 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