chrome-devtools-frontend 1.0.1697595 → 1.0.1698733
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/version-control/SKILL.md +21 -9
- package/.stylelintignore +2 -0
- package/front_end/core/common/VersionController.ts +5 -1
- package/front_end/core/platform/HostRuntime.ts +12 -0
- package/front_end/core/platform/api/HostRuntime.ts +13 -0
- package/front_end/core/platform/browser/HostRuntime.ts +34 -0
- package/front_end/core/platform/node/HostRuntime.ts +40 -0
- package/front_end/core/sdk/AnimationModel.ts +21 -99
- package/front_end/core/sdk/CSSModel.ts +4 -2
- package/front_end/core/sdk/CSSPropertyParser.ts +4 -4
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +4 -44
- package/front_end/core/sdk/Connections.ts +6 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -12
- package/front_end/core/sdk/DOMModel.ts +3 -51
- package/front_end/core/sdk/DebuggerModel.ts +9 -8
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageFunctions.ts +187 -0
- package/front_end/core/sdk/Resource.ts +1 -1
- package/front_end/core/sdk/RuntimeModel.ts +1 -20
- package/front_end/core/sdk/Script.ts +21 -0
- package/front_end/core/sdk/SourceMap.ts +15 -2
- package/front_end/core/sdk/SourceMapCache.ts +13 -10
- package/front_end/core/sdk/SourceMapManager.ts +11 -9
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +59 -17
- package/front_end/core/sdk/SourceMapScopesInfo.ts +8 -2
- package/front_end/entrypoints/heap_snapshot_worker/ContextAnalyzer.ts +635 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +26 -12
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +16 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -4
- package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.ts +2 -0
- package/front_end/entrypoints/shell/shell.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +8 -2
- package/front_end/models/ai_assistance/DOMHelpers.ts +95 -0
- package/front_end/models/ai_assistance/EvaluateAction.ts +5 -42
- package/front_end/models/ai_assistance/ExtensionScope.ts +2 -31
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +27 -2
- package/front_end/models/ai_assistance/ai_assistance.ts +6 -4
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +10 -7
- package/front_end/models/ai_assistance/contexts/FileContext.ts +2 -10
- package/front_end/models/ai_assistance/skills/performance.md +4 -3
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +3 -2
- package/front_end/models/ai_assistance/tools/{GetFunctionCode.ts → GetTraceFunctionCode.ts} +26 -13
- package/front_end/models/ai_assistance/tools/{GetResourceContent.ts → GetTraceResourceContent.ts} +31 -11
- package/front_end/models/ai_assistance/tools/ListSources.ts +21 -14
- package/front_end/models/ai_assistance/tools/Tool.ts +2 -2
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +6 -6
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -10
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +48 -17
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -2
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -1
- package/front_end/models/comment_manager/CD4ABridge.ts +55 -12
- package/front_end/models/comment_manager/CommentManager.ts +46 -91
- package/front_end/models/comment_manager/CommentThread.ts +145 -0
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/elements/DOMChanges.ts +238 -0
- package/front_end/models/elements/elements.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +53 -0
- package/front_end/models/extensions/ExtensionAPI.ts +8 -6
- package/front_end/models/extensions/ExtensionEndpoint.ts +11 -8
- package/front_end/models/extensions/HostUrlPattern.ts +4 -3
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +3 -2
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +2 -1
- package/front_end/models/formatter/FormatterWorkerPool.ts +4 -6
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +55 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +18 -14
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/WebInstallIssue.ts +63 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestMissingId.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallNoManifest.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallStartUrlInvalid.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +20 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +7 -7
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +4 -10
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +25 -5
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +2 -3
- package/front_end/panels/common/CommentThreadWidget.ts +221 -0
- package/front_end/{ui/comments → panels/common}/CommentsOverlayWidget.ts +117 -28
- package/front_end/{ui/comments → panels/common}/CommentsStatusBarPill.ts +5 -5
- package/front_end/panels/common/ExtensionServer.ts +2 -1
- package/front_end/panels/common/commentThreadWidget.css +173 -0
- package/front_end/{ui/comments → panels/common}/commentsOverlay.css +8 -1
- package/front_end/{ui/comments/comments-meta.ts → panels/common/common-meta.ts} +11 -11
- package/front_end/panels/common/common.ts +3 -0
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +5 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +102 -21
- package/front_end/panels/elements/ElementsTreeOutline.ts +326 -91
- package/front_end/panels/elements/EventListenersWidget.ts +0 -1
- package/front_end/panels/elements/PropertiesWidget.ts +11 -10
- package/front_end/panels/elements/PropertyRenderer.ts +29 -25
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
- package/front_end/panels/elements/elementsTreeOutline.css +7 -1
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -3
- package/front_end/panels/event_listeners/EventListenersView.ts +235 -302
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -7
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +5 -1
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +10 -2
- package/front_end/panels/network/NetworkConfigView.ts +141 -116
- package/front_end/panels/network/NetworkPanel.ts +7 -4
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/forward/BackendLinking.ts +5 -2
- package/front_end/panels/recorder/stepView.css +1 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -11
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +7 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +11 -16
- package/front_end/panels/sources/sources-meta.ts +1 -1
- package/front_end/panels/timeline/TimelineTreeView.ts +11 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +0 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentOverlayManager.ts +89 -42
- package/front_end/ui/comments/comments.ts +0 -4
- package/front_end/ui/legacy/Treeoutline.ts +4 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +15 -8
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +5 -5
|
@@ -27,6 +27,10 @@ const UIStrings = {
|
|
|
27
27
|
* @description Title of a section in the debugger showing JavaScript variables from the global scope.
|
|
28
28
|
*/
|
|
29
29
|
global: 'Global',
|
|
30
|
+
/**
|
|
31
|
+
* @description Text in Scope Chain section of the Sources panel.
|
|
32
|
+
*/
|
|
33
|
+
exception: 'Exception',
|
|
30
34
|
/**
|
|
31
35
|
* @description Text in Scope Chain section of the Sources panel.
|
|
32
36
|
*/
|
|
@@ -60,12 +64,18 @@ export class SourceMapScopeChainEntry implements ScopeChainEntry {
|
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
extraProperties(): RemoteObjectProperty[] {
|
|
67
|
+
const extraProperties = [];
|
|
68
|
+
if (this.#isInnerMostFunction && this.#callFrame.exception) {
|
|
69
|
+
extraProperties.push(new RemoteObjectProperty(i18nString(UIStrings.exception), this.#callFrame.exception,
|
|
70
|
+
undefined, undefined, undefined, undefined, undefined,
|
|
71
|
+
/* synthetic */ true));
|
|
72
|
+
}
|
|
63
73
|
if (this.#returnValue) {
|
|
64
|
-
|
|
74
|
+
extraProperties.push(new RemoteObjectProperty(
|
|
65
75
|
i18nString(UIStrings.returnValue), this.#returnValue, undefined, undefined, undefined, undefined, undefined,
|
|
66
|
-
/* synthetic */ true)
|
|
76
|
+
/* synthetic */ true, this.#callFrame.setReturnValue.bind(this.#callFrame)));
|
|
67
77
|
}
|
|
68
|
-
return
|
|
78
|
+
return extraProperties;
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
callFrame(): CallFrame {
|
|
@@ -144,23 +154,55 @@ class SourceMapScopeRemoteObject extends RemoteObjectImpl {
|
|
|
144
154
|
return {properties: [], internalProperties: []};
|
|
145
155
|
}
|
|
146
156
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
157
|
+
if (this.#scope.variables.length === 0) {
|
|
158
|
+
return {properties: [], internalProperties: []};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const expressions = this.#scope.variables.map((_, index) => this.#findExpression(index));
|
|
162
|
+
|
|
163
|
+
if (expressions.every(expr => expr === null)) {
|
|
164
|
+
const properties = this.#scope.variables.map(v => SourceMapScopeRemoteObject.#unavailableProperty(v));
|
|
165
|
+
return {properties, internalProperties: []};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const spreadEntries: string[] = [];
|
|
169
|
+
for (const [index, expr] of expressions.entries()) {
|
|
170
|
+
if (expr !== null) {
|
|
171
|
+
spreadEntries.push(`...(() => { try { return {${index}: eval(${JSON.stringify(expr)})}; } catch {} })()`);
|
|
153
172
|
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const batchExpression = `({ __proto__: null, ${spreadEntries.join(', ')} })`;
|
|
176
|
+
const result = await this.#callFrame.evaluate({
|
|
177
|
+
expression: batchExpression,
|
|
178
|
+
generatePreview: false,
|
|
179
|
+
scopeNumber: this.#scopeNumber,
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
if ('error' in result || result.exceptionDetails || !result.object) {
|
|
183
|
+
const properties = this.#scope.variables.map(v => SourceMapScopeRemoteObject.#unavailableProperty(v));
|
|
184
|
+
return {properties, internalProperties: []};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const {properties: objectProperties} = await result.object.getOwnProperties(generatePreview);
|
|
188
|
+
result.object.release();
|
|
154
189
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
190
|
+
const propertyMap = new Map<string, RemoteObjectProperty>();
|
|
191
|
+
if (objectProperties) {
|
|
192
|
+
for (const prop of objectProperties) {
|
|
193
|
+
propertyMap.set(prop.name, prop);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const properties: RemoteObjectProperty[] = [];
|
|
198
|
+
for (const [index, variable] of this.#scope.variables.entries()) {
|
|
199
|
+
const prop = propertyMap.get(String(index));
|
|
200
|
+
if (!prop || !prop.value) {
|
|
159
201
|
properties.push(SourceMapScopeRemoteObject.#unavailableProperty(variable));
|
|
160
202
|
} else {
|
|
161
|
-
properties.push(new RemoteObjectProperty(
|
|
162
|
-
|
|
163
|
-
|
|
203
|
+
properties.push(new RemoteObjectProperty(variable, prop.value, /* enumerable */ false, /* writable */ false,
|
|
204
|
+
/* isOwn */ true,
|
|
205
|
+
/* wasThrown */ false));
|
|
164
206
|
}
|
|
165
207
|
}
|
|
166
208
|
|
|
@@ -177,7 +219,7 @@ class SourceMapScopeRemoteObject extends RemoteObjectImpl {
|
|
|
177
219
|
if (typeof expressionOrSubRanges === 'string') {
|
|
178
220
|
return expressionOrSubRanges;
|
|
179
221
|
}
|
|
180
|
-
if (expressionOrSubRanges === null) {
|
|
222
|
+
if (expressionOrSubRanges === null || expressionOrSubRanges === undefined) {
|
|
181
223
|
return null;
|
|
182
224
|
}
|
|
183
225
|
|
|
@@ -355,9 +355,10 @@ export class SourceMapScopesInfo {
|
|
|
355
355
|
// w.r.t. each other.
|
|
356
356
|
|
|
357
357
|
let seenFunctionScope = false;
|
|
358
|
-
const result:
|
|
358
|
+
const result: ScopeChainEntry[] = [];
|
|
359
359
|
// Walk the original scope chain outwards and try to find the corresponding generated range along the way.
|
|
360
|
-
for (let originalScope =
|
|
360
|
+
for (let originalScope: ScopesCodec.OriginalScope|null|undefined = innerMostOriginalScope; originalScope;
|
|
361
|
+
originalScope = originalScope.parent) {
|
|
361
362
|
const range = rangeChain.findLast(r => r.originalScope === originalScope);
|
|
362
363
|
// `kind` is just a label for scope UI views and has no semantic significance, so `isStackFrame`
|
|
363
364
|
// decides whether this scope is a function scope.
|
|
@@ -370,6 +371,11 @@ export class SourceMapScopesInfo {
|
|
|
370
371
|
seenFunctionScope ||= isFunctionScope;
|
|
371
372
|
}
|
|
372
373
|
|
|
374
|
+
const globalScope = callFrame.scopeChain()?.find(s => s.type() === Protocol.Debugger.ScopeType.Global);
|
|
375
|
+
if (globalScope) {
|
|
376
|
+
result.push(globalScope);
|
|
377
|
+
}
|
|
378
|
+
|
|
373
379
|
// If we are paused on a return statement, we need to drop inner block scopes. This is because V8 only emits a
|
|
374
380
|
// single return bytecode and "gotos" at the functions' end, where we are now paused.
|
|
375
381
|
if (callFrame.returnValue() !== null) {
|