I tried to debug Zig using GDB.
main.zig:
const std = @import("std");
pub fn main() !void {
var val: i32 = 100;
val += 1;
std.debug.print("try debug {d}.\n", .{val});
}
command:
zig build-exe main.zig
gdb main.exe
b main.zig:4
However, I got an No symbol table is loaded. Use the "file" command. and could not add a breakpoint.
Do I need to add any additional arguments to add Debug Symbol?
platform:
os: windows10
zig: 0.11.0-dev.1987+a2c6ecd6d