Heh… that’s why I learned C#: to mod a game. A good way to learn too IMO, by doing. In my case I figured fixing a mod that wasn’t doing well was a good way to learn.
[edit]
[quote=“Profound_Darkness, post:1, topic:13903”]An open question:
I’ve happened on a handful of bugs not mentioned on github, some of which are exceedingly squirly, and I’d like to fix them but in order to track down the problem code I need to figure out how to attach a debugger to CDDA. I was never very good at debugging using printf. Also I’m accustomed to learning about unfamiliar code by stepping through it. I have both VS2017 which I’ve been unable to get the project loaded/built there, Eclipse (Linux) which I’ve been unable to get the project loaded/built in, as well as Code::Blocks which I find unsatisfying relative to Eclipse and while I’ve gotten the project to load I still use the compiler from the terminal and haven’t been able to get breakpoints to trip.
If you know something about this I would appreciate being pointed to something apt or even an explanation to get going with debugging, ideally with Eclipse as that is what I’m most comfortable working on/debugging C/C++ with. (Also debugging PHP and Java). Failing Eclipse, VS is a distant second choice as I’ve done some C# coding/debugging there, followed by Code::Blocks. All the C/C++ projects I’ve worked on in the past were created with Eclipse hence my lack of knowledge here and my searches haven’t proved useful. My last attempt to get one of those to work was about 2 weeks ago.[/quote]
So I made some progress on this for Eclipse in Linux. Still not building with Eclipse (which is OK) but using an external shell script. I’m using the following settings for the build 'DEBUG_SYMBOLS=1 RELEASE= LUA=1 CLANG=1 CCACHE=1 TILES=1 SOUND=1’
Then I set Eclipse to not autobuild and the debug to launch the binary and breakpoints work (also get details about variables).
Code::Blocks is working much the same though it’s also building from Code::Blocks.
From skimming the Makefile the variable DEBUG_SYMBOLS is used both with and without RELEASE, if it’s not defined then debug symbols are not present.
Also if you’ve built the project using a different set of variables (ie no DEBUG_SYMBOLS and RELEASE=1) it seems you need to do a clean (make clean). I knew better but I still stumbled on that one so I’m being extra clear.
I’ll be removing the open question from the first thread now.
[/edit]