/* 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/>. */
import {
getSelectedFrame,
getCurrentThread,
getIsCurrentThreadPaused,
getIsPaused,
} from "../../selectors/index"; import { PROMISE } from "../utils/middleware/promise"; import { evaluateExpressions } from "../expressions"; import { selectLocation } from "../sources/index"; import { fetchScopes } from "./fetchScopes"; import { fetchFrames } from "./fetchFrames"; import { recordEvent } from "../../utils/telemetry"; import { validateFrame } from "../../utils/context";
const serverRequests = []; // Update the watched expressions as we may never have evaluated them against this thread // Note that selectedFrame may be null if the thread isn't paused.
serverRequests.push(dispatch(evaluateExpressions(selectedFrame)));
// If we were paused on the newly selected thread, ensure: // - select the source where we are paused, // - fetching the paused stackframes, // - fetching the paused scope, so that variable preview are working on the selected source. // (frames and scopes is supposed to be fetched on pause, // but if two threads pause concurrently, it might be cancelled) if (selectedFrame) {
serverRequests.push(dispatch(selectLocation(selectedFrame.location)));
serverRequests.push(dispatch(fetchFrames(thread)));
serverRequests.push(dispatch(fetchScopes()));
}
await Promise.all(serverRequests);
};
}
/** * Debugger commands like stepOver, stepIn, stepOut, resume * * @param string type
*/
export function command(type) { return async ({ dispatch, getState, client }) => { if (!type) { returnnull;
} // For now, all commands are by default against the currently selected thread constthread = getCurrentThread(getState());
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.