Skip navigation

As of at least ADT plugin version 21 there is a TID column displayed in Eclipse’s logcat viewer when you have display settings on maximum verbosity– this thread id is extremely important to parallel programming (or octopus oriented programming as I prefer to call it). However, the thread id will not be preserved if you simply copy and paste the content of this view from within Eclipse. Instead you’ll see something like [debug level] [timestamp] [invocation] (PID)… but no thread id. I don’t know if there is an easier way to grab the TID data directly from Eclipse, but it can be done using a remote adb shell as follows:

Execute the following from your PC’s command line: adb -s [target_device_serial_number] shell “logcat -v threadtime” > [target_output_file]

your session will appear to hang, but in actuality the device’s logcat output, exactly as shown in eclipse’s logcat view including the TID, is being written in real time to your output file. When you want to view the content, exit the logcat dump process with ctrl+c and open the file on your PC. Other options for logcat filtering etc. can be found here



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: