#Getting the traceback of std.debug.print

1 messages · Page 1 of 1 (latest)

proper prairie
#

So if I accidentally do something like:

std.debug.print("{} {} {}", .{x, y}); // <-missing one argument
``` I get an output like this: ```
run
└─ run zig_learn
   └─ install
      └─ install zig_learn
         └─ zig build-exe zig_learn Debug native 1 errors
/usr/lib/zig/std/fmt.zig:183:13: error: too few arguments
            @compileError("too few arguments");
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    print__anon_18284: /usr/lib/zig/std/io/Writer.zig:24:26
    print: /usr/lib/zig/std/io.zig:324:47
    dumpSegfaultInfoPosix: /usr/lib/zig/std/debug.zig:2643:32
    handleSegfaultPosix: /usr/lib/zig/std/debug.zig:2617:13
    attachSegfaultHandler: /usr/lib/zig/std/debug.zig:2558:36
    maybeEnableSegfaultHandler: /usr/lib/zig/std/debug.zig:2535:18
    callMainWithArgs: /usr/lib/zig/std/start.zig:479:14
    main: /usr/lib/zig/std/start.zig:497:12
``` and I have no idea where this issue is coming from. Is there something I must turn on to get the stack traceback to the offending file/line?
#

oh, I see it's a bug lol. Welp not sure how to close this