Google Answers Logo
View Question
 
Q: getting and printing a stacktrace in browser javascript implementations ( No Answer,   3 Comments )
Question  
Subject: getting and printing a stacktrace in browser javascript implementations
Category: Computers > Programming
Asked by: anjanbacchu-ga
List Price: $5.00
Posted: 28 Apr 2005 18:26 PDT
Expires: 28 May 2005 18:26 PDT
Question ID: 515622
Hi There,

  looking for a javascript mechanism to do something similar to 
java.lang.Thread.dumpStack().

  Many times when I am debugging a web application developed by someone else,
I need to know who called whom. In java, calling Thread.dumpStack() in
any context will give me the full thread stack trace. This makes
debugging pretty
easy. Also such a method would be useful in pretty printing/tracing
where my trace() method will be able to indent the traceMessages based
upon the stack pointer ?

Hope that makes sense.

Am looking for javascript code and usage info.

P.S : This should work both in all the popular browsers (I.E,
Mozilla/Firefox/Netscape, etc).

Thank you,

Clarification of Question by anjanbacchu-ga on 29 Apr 2005 11:14 PDT
Hi drr-ga,

  thank you for your quick reply.

  I did not get back to you earlier since it did NOT work in Firefox
1.0x. When I tried it in I.E 6.0 SP1, that worked.

  Do you have a version that works across all browsers(atleast also
Mozilla/Firefox) ?

P.S : You solution currently works for my needs but going forward
firefox is a must need :-)

thank you,

BR,
~A
Answer  
There is no answer at this time.

Comments  
Subject: Re: getting and printing a stacktrace in browser javascript implementations
From: drr-ga on 28 Apr 2005 19:30 PDT
 
I think this is what you want:

http://www.js-examples.com/javascript/?view=309
Subject: Re: getting and printing a stacktrace in browser javascript implementations
From: anjanbacchu-ga on 29 Apr 2005 11:14 PDT
 
Hi drr-ga,

  thank you for your quick reply.

  I did not get back to you earlier since it did NOT work in Firefox
1.0x. When I tried it in I.E 6.0 SP1, that worked.

  Do you have a version that works across all browsers(atleast also
Mozilla/Firefox) ?

P.S : You solution currently works for my needs but going forward
firefox is a must need :-)

thank you,

BR,
~A
Subject: Re: getting and printing a stacktrace in browser javascript implementations
From: anjanbacchu-ga on 21 Jun 2005 17:23 PDT
 
I guess I will have to consider this to be the ANSWER for now.

thank you, drr-ga.

BR,
~A

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy