tomcat在eclipse中調試時,斷點頻繁停在threadpoolexecutor

以前有一個很奇怪的問題:當我在調試程序的時候,我什麼操作都沒有進行,突然debug就停在這了,我感到很奇怪,今天又遇到這種問題了,在網上查了查,原因是:

<pre name="code" class="plain">Typically, the debugger in Eclipse is configured to suspend execution at the location where the exception was thrown, on all uncaught exceptions. Note that the exception might be handled later, lower down in the stack frame and might not lead to the thread being terminated. This would be cause of the behavior observed.</pre><br>  

eclipse在默認情況下勾選了“Suspend execution on uncaught exceptions”,暫停執行未捕獲的異常。因此eclipse會把所有未捕獲的異常先在ThreadPoolExecutor這個類中暫停。

解決方法:Preferences->Java->Debug,去掉"Suspend execution on uncaught exceptions"


原帖地址:http://blog.csdn.net/jueshengtianya/article/details/12023967


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章