How to get a strack trace when an error is thrown? #4475
Replies: 2 comments 4 replies
-
|
Okay, what Claude did:
eprintln!("\n=== Stack from Context ===");
for (i, frame) in context.stack_trace().enumerate() {
let location = frame.position();
eprintln!("Frame {}: {}", i, location.function_name.to_std_string_escaped());
eprintln!(" Path: {}", location.path);
eprintln!(" Position: {:?}", location.position);
if let Some(pos) = location.position {
eprintln!(" Line: {}, Column: {}", pos.line_number(), pos.column_number());
}
}i have now partial stacktraces, but sometimes there are no frames so i cant call position() - this seems to be related to promise resolving or async code. I dont know if i am just too stupid or if this is a bug in boa :/ |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Stack traces are actually not currently supported on the last released version of Boa (0.20). That being said, stack traces have been implemented in the upcoming release of Boa (0.21), which we are in the works of putting together. So, the availability of stack traces will essentially rely on whether you are using 0.20 or the git repository. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Everything seems empty.
do i have to keep track of the files myself or can i somehow set path of a module so the error contains it?
Beta Was this translation helpful? Give feedback.
All reactions