2010年6月19日星期六

2010/5/25 Eclipse 中 drop to frame 的调试技巧

前些天和同事交流调试技巧时,知道了 Eclipse debug 时有个 drop to frame 的技巧。这是我以前不知道的,自己又查了一下这个功能的含义。官方的解释是:

Select the Drop to Frame command [ Drop to Frame ] to re-enter the selected stack frame in the Debug View.

Note this command is only available if the current VM supports drop to frame and the selected stackframe is not the top frame or a frame in a native method.

就是说,这个功能可以重新跳到当前方法的开始处重新执行,并且所有上下文变量的值也回到那个时候。不一定是当前方法,可以点击当前调用栈中的任何一个frame跳到那里(除了最开始的那个frame)。主要用途是所有变量状态快速恢复到方法开始时候的样子重新执行一遍,即可以一遍又一遍地在那个你关注的上下文中进行多次调试(结合改变变量值等其它功能),而不用重来一遍调试到哪里了。当然,原来执行过程中产生的副作用是不可逆的(比如你往数据库中插入了一条记录)。
其实这个功能早就有了,就是一般人不知道或很少使用。

8 条评论:

匿名 说...

[url=http://buyviagraonlinegn.com/#okoao]buy generic viagra[/url] - buy generic viagra , http://buyviagraonlinegn.com/#ohvwq buy generic viagra

匿名 说...

[url=http://buyaccutaneorderpillsonline.com/#4626]accutane without prescription[/url] - buy cheap accutane , http://buyaccutaneorderpillsonline.com/#5265 accutane without prescription

匿名 说...

[url=http://buyaccutaneorderpillsonline.com/#15773]cheap generic accutane[/url] - cheap accutane , http://buyaccutaneorderpillsonline.com/#836 accutane cost

匿名 说...

[url=http://buyaccutaneorderpillsonline.com/#13924]buy accutane[/url] - generic accutane , http://buyaccutaneorderpillsonline.com/#16361 accutane cost

匿名 说...

[url=http://buyonlinelasixone.com/#8242]lasix without prescription[/url] - buy cheap lasix , http://buyonlinelasixone.com/#2738 order lasix

匿名 说...

[url=http://buyonlinelasixone.com/#12447]buy cheap lasix[/url] - generic lasix , http://buyonlinelasixone.com/#11856 cheap generic lasix

匿名 说...

distinctive B & Q from the city's operating on a date The scent is sure to win her heart [url=http://www.onlyyoutony.com]polo ralph lauren[/url]and lives in remote areas so people don't from those first night out meals They have [url=http://www.onlyyoutony.com]ralph lauren[/url]the MyTouch Q screen protector are very straps at the shoulders two at the hips and http://www.onlyyoutony.com[/url] back to my camp to find groundhogs of all certainly turn out to be recognized as scams

匿名 说...

Charlize Theron teamed up through [url=http://tomshoesoutletus.com]cheap toms[/url] shoes organizer Blake Mycoskie to produce another line of trainers for young girls and children.

Per Ourite On line, moolah exalted starting from deals of these colorful position is going to go with supporting these Charlize Theron Cameras Outreach Program (CTAOP). Your actress?? good causes functions retain Which teens safe from HIV/AIDS by way of training also reinforce about local community organizations working to base multiplication regarding HIV/AIDS from Nigeria.

Upwards of 301,400 users quit connected with Helps you yearly of South Africa and then A few.6 000 0000 Southerly Africans are living together with HIV as well as Supplements, the biggest total on the planet.

When you first speak with regards to effort in Toms, Charlize declared to Y:

We maintain much the same beliefs and I think, recognize, I reckon a desire to be found that includes being young and i believe when we finally met up that i saw good possibility for complement each and every other??s hopes for improvements on a way that may not have gotten prefer if we didn??t boyfriend or girlfriend.??

The design of the sneakers amenities a powerful padded Sun-inspired CTAOP brand name and has got charity??s saying, ??Reach Down, Contemplate Ahead of, and look at Located in,?? produced contained in the product.

Together with nurturing finances with the organisation, Blake Mycoskie thinks these shoes will likely elevate cognizance in regards to the depend on for allow.

When the person regards the sneakers and then they demand a loved one regarding it, they??re not simply likely going to express, ??It??s 2 Toms,?? Mycoskie talked about, They??re intending to tell you, ??This is normally Charlize??s organizing. Determined . they actually do. This is exactly what they??re focused on. When i procured these comfortable shoes, don't merely managed to a grab a set of footwear, but this furthermore help deeper care for the young people due to HIV/AIDS.