Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要找到一种方法来枚举我所有的 iPhone 应用程序的活动线程。这严格用于调试目的。如果有的话,私有 API 也是受欢迎的。我知道我可以在调试器窗口中看到所有当前线程,但如果可能的话,我希望能够访问实际的 NSThread 对象。
我认为 PLcrashreporter 可能是您正在寻找的 - 如果您需要了解它如何访问所有活动线程,那么我建议您考虑查看那里的源代码:
http://code.google.com/p/plcrashreporter/
也许你可以看看这里已经回答了什么:
如何在 iPad 应用程序中循环遍历所有活动线程
PLCrashReporter 也在这里被引用,但在它之上还有一些其他的东西。