문제

When using Eclipse PDT with XDebug to debug a PHP web application, is there any way to open up a console window that will allow me to type in and see the value of arbitrary expressions in the current scope?

This would seem like an obvious element of the debugging environment, and I may be missing something, but the only thing resembling a console says "no consoles to display at this time"

도움이 되었습니까?

해결책

Here is the trick, start your PHP debugging session as normal and then when you reach a break-point, or while you are stepping through the code, follow these steps:

  • goto window -> show view
  • choose 'expressions'
  • when the expressions subwindow opens, click on the icon "create new watch expression"
    • [the icon looks like a little algebra equation x+y = ?]
  • enter any arbitrary expression in the dialog box that opens up
  • keep following the previous two steps until you have all the expressions you want to watch

From that point you can continue stepping through the code, add or remove expressions and so forth.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top