markdown 为XAMPP安装Xdebug

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 为XAMPP安装Xdebug相关的知识,希望对你有一定的参考价值。

# Installing Xdebug for XAMPP with PHP 7.x

## Requirements

* XAMPP for Windows: https://www.apachefriends.org/download.html

## Setup

* Download Xdebug for:
  * PHP 7.0.x: https://xdebug.org/files/php_xdebug-2.5.5-7.0-vc14.dll
  * PHP 7.1.x: https://xdebug.org/files/php_xdebug-2.5.5-7.1-vc14.dll
  
* Copy the file `php_xdebug-2.5.5-7.1-vc14.dll` to: `C:\xampp\php\ext`

* Open the file `C:\xampp\php\php.ini` with Notepad++

* Disable output buffering: `output_buffering = Off`

* Scroll down to the `[XDebug]` section and copy this lines:

```ini
[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.5.5-7.1-vc14.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_log="c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
; 3600 (1 hour), 36000 = 10h
xdebug.remote_cookie_expire_time = 36000
```

* Stop/Start Apache

* Click at the Github ★ Star :-)

## PhpStorm

* Works
* Use the [PhpStorm bookmarklets generator](https://www.jetbrains.com/phpstorm/marklets/) to activate Xdebug from the browser side.

## Netbeans

* Works
* Change the Netbeans debugging options: https://postimg.org/image/8tfvemy7l/

## Eclipse

* Works

## Visual Studio Code

* Install the [PHP Debug Adapter for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug).

## Adobe Brackets

* Install the [PHP Debugger for Brackets](https://github.com/spocke/php-debugger).

以上是关于markdown 为XAMPP安装Xdebug的主要内容,如果未能解决你的问题,请参考以下文章

Mac下配置xampp和Xdebug

Mac下配置xampp和Xdebug

XAMPP 无法安装 xdebug

Xdebug 已安装但未在 Xampp 的 Phpinfo 中显示

无法在 XAMPP 和 Windows XP 上安装 Xdebug

PhpStorm+Xampp+Xdebug搭建环境并部署应用