[Windows+MSVC] Inconsistent line terminators between Run/Debug #68
Labels
unintuitive behaviour
Technically correct but doesn't make logical sense
zig-upstream
Zig limitation (relevant issue mentioned in comments)
I have a simple program to take input from the user, then print what the user typed right back out. Along with the length of the user's input.
I am using CLion.
My build.zig file is the standard auto-generated one.
My build configuration is normal except I added the "run" step to it in order to run my code.
When running the program, it works as expected.
However stepping through the same program in the debugger, I get a different output.
Here is a picture of some of the variables in the middle of a debug run.
It seems that the debugger is replacing the windows "\n" with the mac "\r", as well as printing an extra hello somewhere.
Below is the output of another debug run when I changed the code to look for "\r" instead of "\n"
I also did a normal run where the code is looking for "\r" as the delimiter, and signaled end of file with ctrl-d which resulted in the following (expected) error.
I also have a different, but similar, project that can't debug at all as it just hangs on trying to connect to the debugger. However I don't know the steps to reproduce yet as this bug distracted me first.
The text was updated successfully, but these errors were encountered: