.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Debugging with MSVC & STEAM is possible
Old
  (#1)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Debugging with MSVC & STEAM is possible - 07-04-2004

Perhaps already known, but then again:

You can trace crashes by line number using MSVC. You do not really need to set it on 'debug mode'. What i did was set the configuration on Release Mode and changed a few options on the compiling settings:

On the C/C++ Tab:
Debug info is set to : Line Numbers Only

On the Link Tab:
Check the "Generate Debug Info"

THats it. Whenever your bot seems to crash, you can click on the button to 'trace the error'. MSVC will open in Debug mode. SHowing you some ASM crap probably, but you can backtrace that (below you can see the 'route of functions') and find your exact line number where it crashed.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Debugging with MSVC & STEAM is possible
Old
  (#2)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: Debugging with MSVC & STEAM is possible - 07-04-2004

I know Its just that I hate that > 50% of the time I only can see the 'ASM crap' and not my only functions :-\
  
Reply With Quote
Re: Debugging with MSVC & STEAM is possible
Old
  (#3)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Debugging with MSVC & STEAM is possible - 07-04-2004

well, If I wanna debug, I use mostly the debug mode ... well, it isnt running that smooth like the release dll, but it's also still playable on my celeron 466 ( next week I'm gonna be back at my 3ghz )

@rick : you noticed the call stack window where you can see which of your functions called maybe some nonsourcecodeavailable function ?


  
Reply With Quote
Re: Debugging with MSVC & STEAM is possible
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Debugging with MSVC & STEAM is possible - 07-04-2004

Quote:
Originally Posted by @$3.1415rin
nonsourcecodeavailable
rhaa, those pesky Germans definitely can't help with that awful habit of melting words altogether even in non-german languages... unreadable
j/k



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Debugging with MSVC & STEAM is possible
Old
  (#5)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: Debugging with MSVC & STEAM is possible - 07-04-2004

Quote:
Originally Posted by @$3.1415rin
well, If I wanna debug, I use mostly the debug mode ... well, it isnt running that smooth like the release dll, but it's also still playable on my celeron 466 ( next week I'm gonna be back at my 3ghz )

@rick : you noticed the call stack window where you can see which of your functions called maybe some nonsourcecodeavailable function ?
Yep But still sometimes when the game crashes it only should something like HL<nr> instead of anormalandreadeblefunctionname. I even had that it that the game 'hangs' and you have to go manually back to the debugger. But well atleast there is a remaining 50% when the debugger tells me info
  
Reply With Quote
Re: Debugging with MSVC & STEAM is possible
Old
  (#6)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Debugging with MSVC & STEAM is possible - 08-04-2004

yes, sometimes it crashes inside hl. that's often caused by flooding the engine with messages or providing bad pointer.

the debugger is anyway no always helpful, especially if something overwrites some data and half a minute later another part of the bot crashes ...


  
Reply With Quote
Re: Debugging with MSVC & STEAM is possible
Old
  (#7)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Debugging with MSVC & STEAM is possible - 08-04-2004

sometimes the hl.exe will just dump you on windows without any notification. So it immidiatly drops out and leaves you guessing what went wrong.

I hope HL 2 or something will have a much better debugging option for us coders.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com