Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top