Вопрос

I'm using vim and Vdebug (which uses Xdebug) to debug PHP code.

I'm trying to accomplish the following:

  1. Put a breakpoint in a PHP file.
  2. Call a function in that PHP file from an HTML page using javascript.
  3. Break at the breakpoint in the above PHP file.

The above only works if i call the PHP function using another PHP function. The breakpoint is ignored when i call the PHP function using an ajax request.

Any and all help is most welcomed.

Это было полезно?

Решение

Make sure you are setting the correct Xdebug cookie for your browser based testing.

The easiest way to do this is to use an Xdebug helper plugin for your browser.

Full documentation here: http://xdebug.org/docs/remote

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top