Microsoft MakeCode

Using `parseInt` with a `stringSplit` shows difference between device and simulator

I filed an issue for this at: but a little confused why this happens:

let command = "X100\r\n"
let cmdArgs = helpers.stringSplit(command.substr(1, command.length), " ")
serial.writeLine("original: " + cmdArgs[0])
let cmdId = parseInt(cmdArgs[0])
serial.writeLine("parsed:  " + cmdId)

shows different results between the device and the console simulator. I had some issues with my serial command parser and noticed that X100 \r\n made my code work on the device. :-/

That looks like a bug; thanks for filing an issue!

what can I do to help debug this?

Somewhere the translation between TypeScript and the machine code needs to happen. Is there a transpiler involved?