justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
100 stars 24 forks source link

Debug console from log() within a mod doesn't append runtime or newline #111

Closed BurninSun closed 8 months ago

BurninSun commented 8 months ago

Running fmtk in debug mode.

Take the following code:

log("foo") log("goo") log("loo") log("moo")

If this is run via Factorio console with /c, the VSCode debug console correctly shows:

2755.091 Script log("foo") log("goo") log("loo") log("moo"):1: foo
2755.091 Script log("foo") log("goo") log("loo") log("moo"):1: goo
2755.091 Script log("foo") log("goo") log("loo") log("moo"):1: loo
2755.091 Script log("foo") log("goo") log("loo") log("moo"):1: moo

However, if this code is within the mod being debugged, it gets appended all into one line:

foogooloomoo

These should have a newline appended for each call to log()

justarandomgeek commented 8 months ago

1.1.40 fixes this