문제

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