通过eclipse调试视图分析线程 [英] Analysing threads through eclipse debug view

查看:498
本文介绍了通过eclipse调试视图分析线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果一个多线程应用程序正在从eclipse调试中运行,那么有没有办法通过查看所有线程列出的调试视图来知道哪个线程正在睡眠或等待?因为我只能看到正在运行的线程。

解决方案

所有的线程都显示出来,(Running) 值只是意味着你没有暂停线程。您可以使用暂停按钮暂停单个线程或整个应用程序。当您执行此操作时,您可以在视图中扩展线程的条目,并查看它是否正在休眠,等待或执行代码。



正在等待的单个挂起的线程:


If a multi threaded application is running in debug from eclipse then is there any way to know which thread is sleeping or waiting by looking into debug view where all the threads are listed? As I can only see running threads there.

解决方案

All the threads are shown, the (Running) value just means you have not suspended the thread. You can use the Suspend button to suspend an individual thread or the entire application. When you do this you can expand the entry for the thread in the view and see if it is sleeping, waiting or executing code.

Single suspended thread which is waiting:

这篇关于通过eclipse调试视图分析线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆