Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7736101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:39:45+00:00 2026-06-01T07:39:45+00:00

I have a thread with this run method: public void run(){ MAPTable t1 =

  • 0

I have a thread with this run method:

  public void run(){    
    MAPTable t1 = new MAPTable();
    t1.init();
    while(true){
       try {       
           t1.refresh();
       } catch (UnknownHostException e) {
           e.printStackTrace();
       }
       try {
           sleep(10000);
       } catch (InterruptedException e) {
           e.printStackTrace();
       }            
    }        
  }

How can i have i trace of all the functions executed by this thread, NOTE that init() an refresh() methods can call many others functions based on many external conditions.

I have tried to make a NullPointerException or placed one of those lines of code referenced here in the middle of the run() method, but i have always just the last trace which is the run() method (the same line i have used to print the trace).

 Thread.currentThread().getStackTrace()

or

 for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
    System.out.println(ste + "\n");
 }

or

Thread.dumpStack()

PS: I’m not so familiar with the debugger and i don’t know if this can be done with it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:39:47+00:00Added an answer on June 1, 2026 at 7:39 am

    You may find some useful information in http://blog.zvikico.com/2007/11/five-ways-for-t.html

    I think some of the profilers may be able to provide options to generate all call traces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this thread: public void run() { try { while(isThereActivityRunning()) { results =
i have this thread which run as a service: public void run() { try
I have this simple code: public void Run() { var invokerThread = new Thread(new
I have a server thread with this code: public void run() { try {
I have a method public static void startAnimation() { new AnimationThread().run(); } where AnimationThread
I have a problem handling messages in a Thread. My run-method looks like this
I have one thread that is receiving data over a socket like this: while
I've got a class which starts a new thread by calling public void omnom(){
I have a class that extends the Thread class and has its run method
I have a class in C# like this: public MyClass { public void Start()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.