Home  >  Article  >  Backend Development  >  How to Resolve the \"Waiting for Connection (netbeans-xdebug)\" Error in NetBeans

How to Resolve the \"Waiting for Connection (netbeans-xdebug)\" Error in NetBeans

Susan Sarandon
Susan SarandonOriginal
2024-10-24 07:44:30673browse

How to Resolve the

NetBeans shows "Waiting for connection (netbeans-xdebug)"

Overview

This issue "Waiting for connection (netbeans-xdebug)" error message due to inability to configure Xdebug in NetBeans IDE to debug the project.

Environment information

  • XAMPP 1.8.2
  • PHP: 5.4.16
  • NetBeans: 7.3.1
  • Apache: 2.4.4 (Win32)

Configuration

Modify php.ini file

Make sure that the php.ini file contains the following configuration:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9-nts.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host=192.168.1.5
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

NetBeans configuration

In NetBeans IDE:

  1. Navigate to "Tools" > "Options" > "PHP" > "Debug".
  2. Set "Debugger Port" to 9000.
  3. Set "Session ID" to "netbeans-xdebug".
  4. Make sure xdebug.remote_host is set to your computer’s IP address (192.168.1.5 in this case).

Restart Apache

Save php.ini and restart the Apache server.

Results

After following these steps, you should be able to debug your project in NetBeans without the "Waiting for connection (netbeans-xdebug)" error message.

The above is the detailed content of How to Resolve the \"Waiting for Connection (netbeans-xdebug)\" Error in NetBeans. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn