Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Debug options  (Read 853 times)

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Debug options
« on: May 04, 2011, 09:37:30 pm »

Quote
Bloat283   DEBUG OPTIONS    (Future)    Various ways to fiddle with internal settings.

Mr Toady, I beg to differ.  Debug options are not bloat at all.  They should be very important.

If there were a command line option of some sort that made the engine spit out some kind of log of everything it was doing, not just failing at, it would make debugging alot easier for mod creators and probably for you as well (presuming you don't just watch the code running somehow in your Dev Environment).

I am often plagued by things causing crashes, in worldgen or other places, that do not cause any kind of output into errorlog.txt.  If there were an option to give a running tally of everything the game engine was doing, it would make these kind of crashes much easier to diagnose.
Logged
I like fortresses because they are still underground.

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: Debug options
« Reply #1 on: May 05, 2011, 08:23:20 pm »

Sounds good to me. The output file might be excessively large though; DF does a lot of stuff.
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Debug options
« Reply #2 on: May 05, 2011, 08:30:34 pm »

Verbose debug files are always excessively large in every program.  That's why they're useful, since they give you so much output you can see what IS working along with what ISN'T.

How I foresee it being useful is with a persistent reproductable crash.  Once you realize what makes the error happen, you don't always have a clue as to why (like using a certain worldgen seed along with your mods).  You then run "Dwarf Fortress.exe -verbose" or whatever to turn on the debug mode.  Then quickly do what you needed to do to recreate the crash while the game spits out a running log of what it's doing.  Then, once it crashes, you look at the file to see where it went wrong (aha! When that creature attacked that entity in worldgen, it crashed!) Plus, the beautiful thing is that you generally only have to look at the end of the file to see where the program crashed.
Logged
I like fortresses because they are still underground.

G-Flex

  • Bay Watcher
    • View Profile
Re: Debug options
« Reply #3 on: May 05, 2011, 08:35:53 pm »

Debug/testing tools in general would be a great asset to both Toady and the players/testers, I think. Even the arena mode has proved invaluable for testing things.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Debug options
« Reply #4 on: May 05, 2011, 08:44:33 pm »

I would support certain debug options as long as it wasn't "gimmee 1000 of this" kind of debugs. More like "StartSiege" kind of debugs.
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Debug options
« Reply #5 on: May 05, 2011, 10:46:58 pm »

It would work well if it was object based.

Like how pathing currently works in saying creature #9218414 ["DEMON_12"] --> Pathing error, or whatever.

Worldgen stuff would be like Sieges or Creature attacks... anything the game has an extended calculation for, output what procedure it's running and what it's running it ON.

Anything that would normally generate something in Announcements if it were in Fort or Adventure mode, that kind of stuff should go in.  But not once it's done, AS it's being done.  That's the crucial part.

I actually just had a thought.  You know the Current folder?  Have you ever watched it grow and shrink as the game goes on? It would be nice to know if that stuff could be used to diagnose this very thing.  Nobody understands the file format except the DF Program, tho.
Logged
I like fortresses because they are still underground.

sockless

  • Bay Watcher
    • View Profile
Re: Debug options
« Reply #6 on: May 06, 2011, 04:14:03 am »

Bloat doesn't mean that.

In the dev pages, bloat is a positive thing, something that would be nice to have, but not necessary for a fully functioning game.

Also, can people please stop referencing the old dev page?

Toady has discontinued use of it, he doesn't upgrade it and he doesn't reference it. I think he didn't like having a giant checklist of required features in game. The new dev list got rid of the different categories, and instead is a lot more short termed, featuring what he wants to add into the game next.
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?