Saving Debuglog Contents

Blitz3D Forums/Blitz3D Programming/Saving Debuglog Contents

asdfasdf(Posted 2005) [#1]
Is there any way to save the debuglog's contents after an error or when the game shutsdown? I don't really want any extra code with the debuglog cammand.


Beaker(Posted 2005) [#2]
This is the only way:
Global debugfile

Debug "testing"
Debug "testing2"

Function Debug(txt$)
	DebugLog txt
	If Not debugfile
		debugfile = WriteFile("mydebug.txt")
		If Not debugfile Then RuntimeError "Can't record debug"
	EndIf
	WriteLine debugfile,txt
End Function



Filax(Posted 2009) [#3]
Sorry to bump :)




Beaker(Posted 2009) [#4]
OMG! How embarressing!