Files
blockly/core/renderers/common/debug.js
Christopher Allen c5ffd036ca fix: JSDoc improvments for accessors, etc. (#5567)
* fix: Revert removal of documentation for get/set accessors.
  
  This partially reverts commit 839cb7b,
  "fix: infinite loop when using defineProperties (#5549)"

* docs: Use @name to attach JSDocs to accessors

  Reintroduce documentation for deprecated properties where it was
  removed when converting them to accessors.

* docs: Remove duplicate @package declarations

* fix: Fix eslint and compiler errors/warnings

* fix: Minor JSDoc tweaks to address comments on PR #5567
2021-09-29 01:57:28 +01:00

54 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
* @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;