Loading...
  OR  Zero-K Name:    Password:   

How do you debug?

11 posts, 1352 views
Post comment
Filter:    Player:  
sort
I've been finding it quite frustrating making code changes to Zero K due to the fact that errors are silent and there doesn't seem to be a means to print information to somewhere I can see it while testing (I don't understand why "Spring.Echo()" seems to do nothing).
What do you guys do to debug?
+2 / -0

6 years ago
Press F8 to show the debug console. It'll display errors and output to the log.
+5 / -0


6 years ago
GBrankAdminDeinFreund : You've no idea how much happier you've made me!
+1 / -0

6 years ago
Now on the Wiki. http://zero-k.info/mediawiki/index.php?title=Zero-K:Developing#Modifying_the_game
+0 / -0
What about messages when loading as opposed to in-game? I've been trying to use echo statements in the weaponsdef_post, but they're not appearing in the F8 debug console.

(aside: I've been finding this a rather steep learning curve at points (the codebase, not the LUA)... I suppose trying to introduce new mechanics might be ambitious for a first change)
+0 / -0

6 years ago
Personally I just open up infolog.txt (found in Spring base folder, contains a dump of all the visible logs from given game) in a side window when debugging defs loading and other stuff where a lot of data is dumped.
+1 / -0

4 years ago
infolog.txt is better than the tiny debug console, but the output appears to be buffered. The spring source (rts/System/LogOutput.cpp) talks about a LogFlushLevel option, which can be changed so the infolog.txt gets flushed even for unimportant messages (defaults to errors). Where would I set that?
+0 / -0


4 years ago
quote:
Where would I set that?

springsettings.cfg at the root of your install.

Full documentation here
+0 / -0

4 years ago
I usually set springsettings in the Chobby configuration file. Chobby then forwards that to spring.
+0 / -0

4 years ago
That works. Thanks. For anybody finding this thread in the future, I added "LogFlushLevel = 0" to steamapps/common/Zero-K/springsettings.txt.
+0 / -0


4 years ago
Note that "LogFlushLevel = 0" has an impact on performance, otherwise it would be enabled generally. Also you're looking for springsettings.cfg.
+0 / -0