{{tag>php debugger xdebug phpdbg}}


====== PHP DBG для PHP ED ======

{{:php:2013-07-05_13.44.26_2013-07-05_13.44.26_5db8mybe3g.png?200|}}

DBG - PHPEd debugger client

<note important>
Для правильного маппинга необходимо указать полный путь на удаленной машине (Не алиас!)\\
Пример:\\
Создали приложение в: /home/yii2-eav.ztc/basic\\
Алиас к нему (указанный в nginx): /home/yii2-eav.ztc/httpdocs\\
\\
Тогда в настройках отладчика должно стоять **/home/yii2-eav.ztc/basic**
</note>

===== Параметры =====

  DBGSESSID=nnn[@host][:port][;{flags}]

  * nnn - debug session id
  * @host - debug remote host (Где запущен PHPed)
  * :port - debug remote port (Где запущен PHPed) 

**flags**

  * d=1/0 - start/stop debug session 
  * p=1/0 - start/stop profiler session
  * s=skip - skip number of HTTP requests before actual session should run

===== WEB php-fastcgi debug =====

  zend_extension=/usr/lib/php5/20090626/dbg-php-5.3.so
  debugger.enabled = On
  debugger.enable_session_cookie = On
  debugger.profiler_enabled = off
  debugger.hosts_allow = 192.168.1.6
  debugger.hosts_deny = ALL
  debugger.ports = 7869 10000/16
  
  debugger.JIT_enabled = On
  debugger.JIT_host = 192.168.1.6
  debugger.JIT_port = 7869
  
  ;debugger.enable_session_cookie = Off
  ;debugger.enabled = On
  ;debugger.hosts_allow=192.168.1.6
  ;debugger.hosts_deny=ALL
  ;debugger.ports=7869 10000/16
  ;debugger.fail_silently = On
  ;debugger.ignore_nops = Off
  ;debugger.JIT_enabled = Off
  ;debugger.JIT_host = clienthost
  ;debugger.JIT_level = 3
  ;debugger.JIT_port = 7869
  ;debugger.profiler_enabled = Off
  ;debugger.session_nocache = On
  ;debugger.timeout_seconds = 300

Пример:

  Cookie: DBGSESSID=1
  Cookie: DBGSESSID=1@192.168.1.6:7869;d=1,p=1
  path: ?DBGSESSID=1
===== Console cli debug =====

  DBGSESSID=1@clienthost:7869;d=1,p=1 
  DBGSESSID=1;d=1,p=0 
  DBGSESSID=1:7869;d=1,p=0,s=5 

Пример:

  php script.php DBGSESSID=1@192.168.1.6:7869;d=1
