-
Notifications
You must be signed in to change notification settings - Fork 3.7k
/
debug.js
53 lines (47 loc) · 1.08 KB
/
debug.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* @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
* @package
*/
const isDebuggerEnabled = function() {
return useDebugger;
};
exports.isDebuggerEnabled = isDebuggerEnabled;
/**
* Turn on the blocks debugger.
* @package
* @alias Blockly.blockRendering.debug.startDebugger
*/
const startDebugger = function() {
useDebugger = true;
};
exports.startDebugger = startDebugger;
/**
* Turn off the blocks debugger.
* @package
* @alias Blockly.blockRendering.debug.stopDebugger
*/
const stopDebugger = function() {
useDebugger = false;
};
exports.stopDebugger = stopDebugger;