Guidelines for utilizing source maps and structured stack traces in DevTools. Covers DebuggerWorkspaceBinding, StackTrace, SymbolizedError, and related UI widgets.
57
65%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/devtools-source-maps/SKILL.mdThis skill guides you on how to correctly map runtime coordinates to original source locations and render structured stack traces or symbolized errors in the DevTools frontend.
DebuggerWorkspaceBinding helpers
to structurally parse and translate stack traces.SymbolizedError subscribe to
live locations. Always call .dispose() when the consumer (e.g., a widget
or list) is destroyed to avoid memory leaks.StackTracePreviewContent for raw stacks, and
SymbolizedErrorWidget for complete errors.front_end/models/stack_trace/)A structured representation of a call stack (synchronous + asynchronous segments).
StackTrace / ParsedErrorStackTrace / DebuggableStackTrace:
Dispatches a StackTrace.Events.UPDATED event when the original sources
are fully resolved or update.Frame: Represents a single frame, which contains uiSourceCode,
url, line/column info, untranslated rawName, translated name, and
inline information.front_end/models/bindings/SymbolizedError.ts)A union type representing a fully symbolized error.
SymbolizedErrorObject: Contains error message, stackTrace (as a
ParsedErrorStackTrace), and an optional cause (another
SymbolizedError). Also holds compile/eval syntaxErrorLocation.UnparsableError: Fallback when parsing fails.Translates raw coordinates into UI-friendly original source coordinates:
const uiLocation = await Bindings.DebuggerWorkspaceBinding.instance()
.rawLocationToUILocation(rawLocation);const stack = await Bindings.DebuggerWorkspaceBinding.instance()
.createStackTraceFromProtocolRuntime(protocolStackTrace, target);const stack = await Bindings.DebuggerWorkspaceBinding.instance()
.createStackTraceFromDebuggerPaused(pausedDetails, target);const stack = await Bindings.DebuggerWorkspaceBinding.instance()
.createStackTraceFromErrorStackLikeString(target, stackString, exceptionDetails);const symbolizedError = await Bindings.DebuggerWorkspaceBinding.instance()
.createSymbolizedError(remoteObject, exceptionDetails);Renders a structured StackTrace inside Shadow DOM. Handles expandable UI and
collapsing ignore-listed files.
import * as Components from '../../ui/legacy/components/utils/utils.js';
import * as Workspace from '../../models/workspace/workspace.js';
const preview = new Components.JSPresentationUtils.StackTracePreviewContent();
preview.stackTrace = stackTrace;
preview.options = {
expandable: true,
showColumnNumber: true,
ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager.instance(),
};
this.contentElement.appendChild(preview.element);Displays a complete SymbolizedError including recursive causal chains
("Caused by: ...") and syntax error locations.
import * as Panels from '../../panels/panels.js';
import * as Workspace from '../../models/workspace/workspace.js';
const errorWidget = new Panels.Console.SymbolizedErrorWidget();
errorWidget.error = symbolizedError;
errorWidget.ignoreListManager = Workspace.IgnoreListManager.IgnoreListManager
.instance();
this.contentElement.appendChild(errorWidget.element);symbolizedError.dispose() is called
on consumer widget cleanup.ignoreListManager set.184a74d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.