Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Guide to debugging dfhack?  (Read 1918 times)

DarthRubik

  • Bay Watcher
  • Likes Rubik's Cubes for their colorful pieces
    • View Profile
Guide to debugging dfhack?
« on: September 23, 2021, 07:14:22 pm »

Is there a guide to debugging dfhack/plugins......I am currently trying to get df-ai (0.47.05-r1) running on my linux machine and I am having it hang......I just want to see where it is hanging and that might give me a clue as to how to fix it......

So any thoughts?
Logged

DarthRubik

  • Bay Watcher
  • Likes Rubik's Cubes for their colorful pieces
    • View Profile
Re: Guide to debugging dfhack?
« Reply #1 on: September 23, 2021, 08:17:42 pm »

For future reference this is what I discovered.

On linux "dfhack -g" will launch a gdb session, which is exactly what I needed
Logged

myk

  • Bay Watcher
    • View Profile
Re: Guide to debugging dfhack?
« Reply #2 on: September 26, 2021, 09:30:26 am »

Also, building DFHack with CMAKE_BUILD_TYPE set to RelWithDebInfo helps immensely.  You can configure that by going into the build/ directory and running
Code: [Select]
ccmake .. then going down to the CMAKE_BUILD_TYPE and using ENTER to toggle the setting. (then running (c)onfigure and (g)enerate to rebuild the build files)
Logged