I have recently started working on a game using adv3lite for the first time, and it made me notice something surprising about the Workbench, because when a project uses a library outside of the project folder, the Workbench uses something it calls the “library folder search list” which allows it to find libraries in multiple places. On the surface that seems like a fine feature, but it seems that t3make has no such feature, so Workbench produces an invalid t3m file that t3make will not accept because it does not include paths for the libraries.
As far as I can tell, t3make has no way to search for libraries in multiple places, and that is why Workbench does not bother trying to create a valid t3m file. But what if I want a valid t3m file? It seems that Workbench needs to have its library folder search list if you want to include libraries outside the project folder, while t3make cannot accept a library folder search list, so we must choose one or the other.
My first inclination is that this is a fault in Workbench, since it is producing an invalid t3m file, so I try migrating my project to t3make instead. But then I realize how useful Workbench can be for debugging. How do I create breakpoints without Workbench? How do I step through the code to debug it? What debugging tools of any sort exist without Workbench? Is it even really possible to go without Workbench?
What do we get from t3make that Workbench does not provide? There is “-Os” which creates a file containing all the game’s strings, which might be useful for spell-checking. There is “-P” which shows the result of pre-processing, which might be useful for debugging. Also having a valid t3m file can make a project compatible with tools other than Workbench and would be useful for people who are not using Workbench.
I can’t help you with Workbench, because I’ve never used it, but I wrote a very large TADS3 game without it (on Mac). Using reflection services, stack traces, and a set of debugging verbs that grew as the game grew seemed to get me along fine.
You can set command line switches from within Workbench. For example, choose the Build menu. Then Settings → Compiler → Advanced. In the Additional Command Line Options box type -Os strings.txt then click OK. Then from the Build menu select Full Compile for debugging. You should then find a file called strings.txt in your main project folder containing all the strings from the program.
You can do essentially the same with the -P option and the output will be sent to the main Workbench window (although I’m not sure how helpful that is).
Is there a guide available of tips for how to debug a game using techniques like you used? Breakpoints seem so enormously useful that it is difficult to imagine choosing to debug without having breakpoints available as a tool, but it is always nice to have more debugging techniques available for dealing with whatever tricky situation might arise.
Hm, I did not run into memory errors, but I wasn’t using adv3Lite or the TESTALL command. Also I always used QTads. So I don’t really know what’s going on
The thing is, I learned programming from scratch through the game that I made, so I didn’t even know about debuggers and breakpoints back then. Basically I got very intimately acquainted with digging through the adv3 library source, and inserting debug-print or print-the-stack-trace statements where needed. Plus I had a whole .t file full of testing aids, many of which I’m sure appear in other forms elsewhere.