breakOnNext.js (677B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ 4 5 import { getCurrentThread } from "../../selectors/index"; 6 /** 7 * Debugger breakOnNext command. 8 * It's different from the comand action because we also want to 9 * highlight the pause icon. 10 * 11 * @memberof actions/pause 12 * @static 13 */ 14 export function breakOnNext() { 15 return async ({ dispatch, getState, client }) => { 16 const thread = getCurrentThread(getState()); 17 await client.breakOnNext(thread); 18 return dispatch({ type: "BREAK_ON_NEXT", thread }); 19 }; 20 }