Merge pull request #753 from lightpanda-io/console_error_stack_trace

Make stacktraces available in debug via `page.stackTrace()`
This commit is contained in:
Karl Seguin
2025-06-04 08:34:09 +08:00
committed by GitHub
3 changed files with 16 additions and 1 deletions

View File

@@ -601,6 +601,10 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
return persistent_object.castToObject();
}
pub fn stackTrace(self: *const Scope) !?[]const u8 {
return stackForLogs(self.call_arena, self.isolate);
}
// Executes the src
pub fn exec(self: *Scope, src: []const u8, name: ?[]const u8) !Value {
const isolate = self.isolate;