I saw there was a post by a user who used factorio.exe > my.log or something like that...
But since the update, he wasn't able to log his print() anymore.
Has a solution for this problem be found yet ?
What is the best way to investigate a table, real-time ?
It's silly that each individual modder has to investigate the table for themselves. The table data should be documented...
How to log my results for debug ?
- MisterBrownZA
- Burner Inserter
- Posts: 8
- Joined: Mon Nov 02, 2015 7:10 am
- Contact:
Re: How to log my results for debug ?
Still works fine in 0.12.16 on Linux. Are you able to reproduce this not working on Windows? What's the problem there?MisterBrownZA wrote:I saw there was a post by a user who used factorio.exe > my.log or something like that...
But since the update, he wasn't able to log his print() anymore.
Has a solution for this problem be found yet ?
If it's not a game object with only __self in it, print(serpent.block(table))MisterBrownZA wrote:What is the best way to investigate a table, real-time ?
Like https://forums.factorio.com/wiki/inde ... ua_objects?MisterBrownZA wrote:It's silly that each individual modder has to investigate the table for themselves. The table data should be documented...
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
- MisterBrownZA
- Burner Inserter
- Posts: 8
- Joined: Mon Nov 02, 2015 7:10 am
- Contact:
Re: How to log my results for debug ?
Hi prg,
thanks for the speedy response.
That's correct. I can't generate a log file using factorio.exe > debug.log.
There's no way for me to currently see a dump of the text.
Anyone know how to replicate this for windows ? Should I be running a dedicated server ?
---------------------
I will try
I tried using
But that expects a string, so I can't interpret a table.
Thanks for the wiki. I was getting very frustrated trying to figure everything out.
thanks for the speedy response.
That's correct. I can't generate a log file using factorio.exe > debug.log.
There's no way for me to currently see a dump of the text.
Anyone know how to replicate this for windows ? Should I be running a dedicated server ?
---------------------
I will try
Code: Select all
print(serpent.block(table))
Code: Select all
game.show_message_dialog{text = {event}}
Thanks for the wiki. I was getting very frustrated trying to figure everything out.
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: How to log my results for debug ?
https://forums.factorio.com/wiki/inde ... write_file
Code: Select all
Game.write_file("MyMod_logOutput.txt", textToLog, true)
- MisterBrownZA
- Burner Inserter
- Posts: 8
- Joined: Mon Nov 02, 2015 7:10 am
- Contact:
Re: How to log my results for debug ?
Thanks for this!ratchetfreak wrote:https://forums.factorio.com/wiki/inde ... write_file
Code: Select all
Game.write_file("MyMod_logOutput.txt", textToLog, true)
Along with that
print(serpent.block())
I'm ready to debug now! Is there a way I can close this thread ?
Re: How to log my results for debug ?
We usually keep these threads open, in case someone has still problems with it or changes in the game make the code invalid.MisterBrownZA wrote:I'm ready to debug now! Is there a way I can close this thread ?
Also, someone might have better ideas or can improve on existing ones.