SmartTrace is actually consuming 1-based columns coming from ObjectActor grip for JS Error object's stacktrace. But it maps to 0-based columns as it relies on Debugger Frames components. This is made uterly complicated as we also have to deal with source maps and original locations which are 0-based as well. Differential Revision: https://phabricator.services.mozilla.com/D263580
34 lines
871 B
HTML
34 lines
871 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Web Console test for opening console call stacktrace links in Debugger</title>
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
</head>
|
|
<body>
|
|
<p>Web Console test for opening console call stacktrace links in Debugger.</p>
|
|
<script type="text/javascript">
|
|
"use strict";
|
|
|
|
function foo() {
|
|
bar();
|
|
}
|
|
|
|
function bar() {
|
|
console.log(new Error("myErrorObject"));
|
|
|
|
console.trace();
|
|
|
|
// Test that unresolved URL can still be opened in the debugger
|
|
// eslint-disable-next-line no-eval
|
|
eval(`console.log(new Error("customSourceURL")); //# sourceURL=http://example.org/./source.js`);
|
|
|
|
atob(-1);
|
|
}
|
|
|
|
foo();
|
|
</script>
|
|
</body>
|
|
</html>
|