Files
sousa-gecko/devtools/shared/specs/descriptors/process.js
T
Alexandre Poirot c684086c38 Bug 1944109 - [devtools] Allow debugging scripts via their WindowGlobal target when reusing the browser toolbox codepath. r=devtools-reviewers,devtools-backward-compat-reviewers,hbenl,bomsy
The Browser Toolbox currently debug all scripts in a given content process
via the related Content Process Target actor.
Because of this, we have to ignore the WindowGlobal Target actors
for anything related to Sources, breakpoints,...

But VS.Code would benefit from reusing the Browser Toolbox codepath,
while never using the Content Process targets (which have no real meaning for the user in VS.code),
and instead debug the sources via the WindowGlobal Target actors.

Introduce a new configuration to be able to distinguish the two codepaths.

Differential Revision: https://phabricator.services.mozilla.com/D235681
2025-02-27 09:56:47 +00:00

45 lines
987 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {
generateActorSpec,
RetVal,
Option,
} = require("resource://devtools/shared/protocol.js");
const processDescriptorSpec = generateActorSpec({
typeName: "processDescriptor",
methods: {
getTarget: {
request: {},
response: {
process: RetVal("json"),
},
},
getWatcher: {
request: {
// Added in Fx137 for Vs.Code
enableWindowGlobalThreadActors: Option(0, "boolean"),
},
response: RetVal("watcher"),
},
reloadDescriptor: {
request: {
bypassCache: Option(0, "boolean"),
},
response: {},
},
},
events: {
"descriptor-destroyed": {
type: "descriptor-destroyed",
},
},
});
exports.processDescriptorSpec = processDescriptorSpec;