开发者

Eclipse PDT debugging web application: evaluating expressions in a console

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜