I'm currently attempting to use XDebug 2.2.1 and PHPStorm 7.1 to debug my WordPress plugin. So far, I've successfully installed XDebug and breakpoints are working fine. However, I'm unable to access any of the variables being used in the functions in which I'm breaking.
For instance, I break in this code:
function generateGoalCard($sub) {
$goalID = $this->CodeLibrary->convertStringToInt($sub->goalID);
$userID = $this->CodeLibrary->convertStringToInt($sub->userID);
print('goalID: '); // BREAK POINT HERE
// Other unimportant code ...
}
Below is a screenshot of the debugging window at the above break point. As you can see, $goalID
and $userID
are not accessible. How can I gain access to my plugin's variables?
$goalID
returnsresult = null
.var_dump
I was doing of$userID
and then opened my page in a new tab. Again, PHPStorm catches the breakpoint but nothing is rendered in the page. I'm not knowledgable enough to know whether or not thatvar_dump
should have been rendered in my browser before the code execution was suspended. After resuming the code, thevar_dump
is rendered as expected.index.php
like the Frames pane seems to believe.