mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
* Add annotations to files under core/events * Add annotations to files under core/interfaces * Add annotations to files under core/keyboard_nav * Add annotations to files under core/renderers * Add annotations to files under core/serialization * Add annotations to files under core/theme * Add annotations to files under core/toolbox * Add annotations to files under core/utils * Add annotations to files under core
56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Block rendering debugging functionality.
|
|
*/
|
|
'use strict';
|
|
|
|
/**
|
|
* Block rendering debugging functionality.
|
|
* @namespace Blockly.blockRendering.debug
|
|
*/
|
|
goog.module('Blockly.blockRendering.debug');
|
|
|
|
|
|
/**
|
|
* Whether or not the debugger is turned on.
|
|
* @type {boolean}
|
|
*/
|
|
let useDebugger = false;
|
|
/**
|
|
* Returns whether the debugger is turned on.
|
|
* @return {boolean} Whether the debugger is turned on.
|
|
* @alias Blockly.blockRendering.debug.isDebuggerEnabled
|
|
*/
|
|
const isDebuggerEnabled = function() {
|
|
return useDebugger;
|
|
};
|
|
/** @package */
|
|
exports.isDebuggerEnabled = isDebuggerEnabled;
|
|
|
|
/**
|
|
* Turn on the blocks debugger.
|
|
* @package
|
|
* @alias Blockly.blockRendering.debug.startDebugger
|
|
*/
|
|
const startDebugger = function() {
|
|
useDebugger = true;
|
|
};
|
|
/** @package */
|
|
exports.startDebugger = startDebugger;
|
|
|
|
/**
|
|
* Turn off the blocks debugger.
|
|
* @package
|
|
* @alias Blockly.blockRendering.debug.stopDebugger
|
|
*/
|
|
const stopDebugger = function() {
|
|
useDebugger = false;
|
|
};
|
|
/** @package */
|
|
exports.stopDebugger = stopDebugger;
|