简体   繁体   中英

Android - How can I find out where the current thread was created?

I'm working on a huge Android app using Eclipse that's got tons of code the I'm unfamiliar with.

There's a thread that's being spawned way too many times, and I'm not sure where it's being spawned as there's lots of code that spawns this thread.

How can I find where the thread was spawned in Eclipse?

Note: The thread does appear to have a name of sorts... In the thread Debug stacktrace, I can see "Thread [<18> *] where * is some dynamic info (not a simple string that's embedded in the app).

As @Aneesh said, this is answered here on StackOverflow. You asked about Android, but it's the same for Java pretty much:

how to find out who create a thread in java?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM