Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all ,

i am using VS 2010 Ultimate ,

a c++ sample program writen by me throws an exception at certain point.
is there any way to back trace & find out at which point exception thrown or error occours ?
please provide me any link for the same

thanks in advance. :)

--
update moved from answer

Thanks for your replies ,

I don't want time machine Smile just some log which will tell me which function called & from where exception thrown ? , i think it is possible right ? this is for thouse unhandle exception which occours unexpectedly.
Posted
Updated 1-Feb-11 2:51am
v2

You could have a look at the call stack. This allows you who called the function that caused the error. See here for a short introduction:
http://msdn.microsoft.com/en-us/library/a3694ts5.aspx[^]

If you are using .NET you could use the VS historical debugging feature as described here:
http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/06/16/how-does-vs2010-historical-debugging-work.aspx[^]

You should also definitely read this great CP article that describes a lot of other debugging features:
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
 
Share this answer
 
v2
Comments
Sandeep Mewara 1-Feb-11 1:49am    
Nice answer! 5!
Indivara 1-Feb-11 8:53am    
OK, I 5'd this too. Time machines do exist after all.
JF2015 1-Feb-11 8:55am    
Thanks :)
Albert Holguin 27-Jun-11 9:55am    
my 5... the call stack is usually good enough for C++... and there's also TRACE statements (which I didn't see a reference to in that CP article, you'd figure that would be there)
i got it , it is available in visual studio trace
 
Share this answer
 
You mean run the program backwards? I doubt that is possible (unless you have a time machine)
Why not handle exceptions in your program? That way you will know where it occurred?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900