xtreampb Posted January 24, 2013 Share Posted January 24, 2013 I'm trying to do some debugging. When my code goes to the "un-handled exception, press break to debug" message box, it takes me to the utility and vector source code. I know that the bug is in my code, not these classes. So i'm asking how do i use the stack to debug my code. I know i can see what function threw the error, but does it give me any more information like args passed to it? I've never had to use the stack before now so i'm in-experienced in using it to debug software. Thanks ~Xtreampb~ Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Rick Posted January 24, 2013 Share Posted January 24, 2013 In Visual Studio the call stack shows you the chain of functions. If you dbl click it'll bring you to said function (normally look for the last of your functions and go there). Then you can mouse over variables to see what's up. Generally this is all I need to tell me why I got the error. 1 Quote Link to comment Share on other sites More sharing options...
Canardia Posted January 24, 2013 Share Posted January 24, 2013 However, quite often it happens that the same code runs differently in debug and release mode, and either the error occurs only in debug mode, or only in release mode. Then it's impossible to debug the program, except with printf(); statements until you find the line which causes the error. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
xtreampb Posted January 26, 2013 Author Share Posted January 26, 2013 i know it has something to do with my collisions. When my object collides it is destroyed. What i think is happening is it is colliding a second time and it hasn't been destroyed from the first collision. so it tries to destroy it the second time but there is nothing to destroy. Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.