è¿å
¥debug模å¼æ¹æ³æ¥éª¤ï¼
1, é¦å
å¨ä¸ä¸ªjavaæ件ä¸è®¾æç¹ï¼ç¶åè¿è¡ï¼å½ç¨åºèµ°å°æç¹å¤å°±ä¼è½¬å°debugè§å¾ä¸ã
2, F5é®ä¸F6é®å为åæ¥è°è¯ãF5æ¯step into,ä¹å°±æ¯è¿å
¥æ¬è¡ä»£ç ä¸æ§è¡ï¼F6æ¯step overä¹å°±æ¯æ§è¡æ¬è¡ä»£ç ï¼è·³å°ä¸ä¸è¡ã
3,F7æ¯è·³åºå½æ°
4,F8æ¯æ§è¡å°æåã1.Step Into (also F5) è·³å
¥
2.Step Over (also F6) è·³è¿ã
3.Step Return (also F7) æ§è¡å®å½åmethodï¼ç¶åreturnè·³åºæ¤method
4.step Filter éæ¥è¿æ»¤ ä¸ç´æ§è¡ç´å°éå°æªç»è¿æ»¤çä½ç½®ææç¹(设置Filter:window-preferences-java-Debug-step Filtering)
5.resume éæ°å¼å§æ§è¡debug,ä¸ç´è¿è¡ç´å°éå°breakpoint
6.hit count 设置æ§è¡æ¬¡æ° éåç¨åºä¸çfor循ç¯(设置 breakpoint view-å³é®hit count)ã
7.inspect æ£æ¥ è¿ç®ãæ§è¡ä¸ä¸ªè¡¨è¾¾å¼æ¾ç¤ºæ§è¡å¼ã
8.watch å®æ¶å°çè§åéçååã
9.æ们常说çæç¹(breakpoints)æ¯æline breakpoints,é¤äºline breakpoints,è¿æå
¶ä»çæç¹ç±»åï¼field(watchpoint)breakpoint,method breakpoint,exception breakpoint.
10.field breakpoint ä¹å«watchpoint(çè§ç¹) å½æååé被读åæä¿®æ¹æ¶ææã
11.æ·»å method breakpoint è¿å
¥/离å¼æ¤æ¹æ³æ¶ææ(Run-method breakpoint)ã
12.æ·»å Exception breakpoint ææå°Execptionæ¶ææ(å¾
ç»...)ã
æç¹å±æ§ï¼
1.hit count æ§è¡å¤å°æ¬¡æ°åææ ç¨äºå¾ªç¯ã
2.enable condition éå°ç¬¦åä½ è¾å
¥æ¡ä»¶(为ture\æ¹åæ¶)å°±ææã
3.suspend thread å¤çº¿ç¨æ¶æææ¤çº¿ç¨ã
4.suspend VM ææèææºã
13.variables è§å¾éçåéå¯ä»¥æ¹ååéå¼ï¼å¨variables è§å¾éæ©åéç¹å»å³é®--change value.ä¸æ¬¡æ¥è¿è¡å¿«éè°è¯ã
温馨提示:答案为网友推荐,仅供参考