0

I've got the Xdebug plugin working with Sublime Text 3 (as well as the SFTP plugin), and I can successfully set breakpoints and have the Xdebug Context pane populate with every variable in my phpBB site; and I can expand arrays and examine their contents. But it escapes me as to how to find, among the hundreds of variables in the list, a particular variable of interest and its value. Nor can I find where it's documented as to how to find it. Are there any good resources for this? As I say, I have the basics working - this fundamental step eludes me and prevents me from debugging.

Xdebug Context pane

I tried issuing printf's in the console window, but no matter what I enter there, I get "SyntaxError: invalid syntax"


Edit: I've stumbled on the solution! Once you've hit a breakpoint and the Xdebug Context presents, give that tab focus and do a Ctrl + F - a "Find" dialog presents at the bottom of the Sublime window that permits you to search for a variable. The "" button permits you to constrain the search to exactly what's typed, because e.g., "alpha" is contained within "alphanumeric":

Screenshot of Find Dialog

3
  • I'm not using Sublime Text, but anyway: how about you use "Xdebug Watch" tab -- you should be able to add the desired variable there to watch after. Commented Mar 24 at 22:59
  • That's a thought - but in a single debugging session, the examination of one variable could lead to the decision to examine another. Don't watch variables have to be set at the beginning of a session? At any rate, I stumbled on the solution - but thanks for the suggestion. I'll edit my post with the new info. Commented Mar 25 at 16:46
  • You should be able to add variable to Watched at any time (normal approach -- it's a "watch list", meaning: "I'm interested in those few out of all of the rest"). Side note: looks like phpBB uses a lot of variables in (global?) context.. or it's Sublime Text that displays them this way. Because normally you should have less of them (but then: it depends on a code base). Commented Mar 25 at 17:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.