开发者

Eclipse conditional debug

开发者 https://www.devze.com 2023-03-27 05:43 出处:网络
I\'m wondering if there is a way to add a conditional break point in eclipse while debuging. Sample: if city==\"New York\" 开发者_如何学运维then break.Yes. Right-click on the breakpoint, select \"Brea

I'm wondering if there is a way to add a conditional break point in eclipse while debuging. Sample: if city=="New York" 开发者_如何学运维then break.


Yes. Right-click on the breakpoint, select "Breakpoint properties", enable "Conditional" and then enter the condition. Note that city == "New York" wouldn't be a good condition due to the way equality works in Java, but "New York".equals(city) would be fine. Note that Eclipse allows simple Boolean conditions like this, and also "suspend when value changes".


Here is the detailed tutorials. http://wiki.eclipse.org/FAQ_How_do_I_set_a_conditional_breakpoint%3F


Open the context menu over a break point on the left bar of the code editor, select "Breakppoint properties..." and "Enable condition"

0

精彩评论

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