Debugging a configuration omits command line args defined in build.zig
I have a run step defined in my build.zig that supplies an argument to the executable.
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
run_cmd.addArg(b.pathJoin(&.{ b.install_prefix, "assets" }));
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
When I run this configuration using the plugin, it works as expected. However when I debug this configuration, the argument is never supplied to the executable.
If you have an idea how this might be accomplished, let me know. I cloned this repo and was able to get the plugin running in a development instance, and may endeavor to fix it myself.
You can add the arguments in the run configuration. This is a limitation of how IntelliJ's debugger has to be attached to the process to work, so instead of debugging zig build run directly, it just runs zig build, then runs the executable with the debugger.
Debugging the executable launched zig build run task directly doesn't work without a complicated custom build runner that i would need to maintain and update for every single zig update, so i'm waiting with that until zig 1.0.0 is released.