I am using this vim plugin https://github.com/ludovicPelle/vim-xdebug using xdebug
Xdebug and the vim plugin work fine with regular scripts. I can view and print the variables.
When I try to run the basic unit test, it gets to the breakpoint and stops, and I can execute the code in order, but I can no longer view the contents of the variables.
I am trying to get this to work with a very simple unit test
class testClass extends \PHPUnit_Framework_TestCase { public function testSomething() { $a = 5; $b = 6; $c = 7; } }
When I go to the end of the method and try to print the contents of $ a, I get the following error.
13 : send =====> property_get -i 13 -d 0 -na 13 : recv <===== {{{ <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="13" status="break" reason="ok"><error code="300"><message><![CDATA[can not get property]]></message></error></response> }}} response status=break xmlns=urn:debugger_protocol_v1 xmlns:xdebug=http:
When I print out the whole context, 3 variables are displayed as follows
$command = 'context_get'; a = ''; b = ''; c = '';
I know that phpunit does some interesting tricks when it runs test class methods, so it is possible that the debugger is not returning variables in the method. Any suggestions would be greatly appreciated, thanks.
source share