diff --git a/src/browser/browser.zig b/src/browser/browser.zig index ed0960ef..33157c0f 100644 --- a/src/browser/browser.zig +++ b/src/browser/browser.zig @@ -385,7 +385,11 @@ pub const Page = struct { if (res.success) { log.debug("eval inline: {s}", .{res.result}); } else { - log.info("eval inline: {s}", .{res.result}); + if (builtin.mode == .Debug and res.stack != null) { + log.info("eval inline: {s}", .{res.stack.?}); + } else { + log.info("eval inline: {s}", .{res.result}); + } } return; @@ -438,7 +442,11 @@ pub const Page = struct { }; } - log.info("eval remote {s}: {s}", .{ src, res.result }); + if (builtin.mode == .Debug and res.stack != null) { + log.info("eval remote {s}: {s}", .{ src, res.stack.? }); + } else { + log.info("eval remote {s}: {s}", .{ src, res.result }); + } return FetchError.JsErr; } }