Hello. Thank you for report.
This happens when you run Factorio in debug mode and is not a problem.
In this mode, the exception is not handled by the game but is passed to the debugger (most likely the Factorio Modding Tool Kit in VSCode).
The actual issue causing your program not to work is the instruction jmp loop; the correct form is jmp :loop