Function
runInDebug (func) public
Module: | @ember/debug |
---|
Defined in packages/@ember/debug/index.ts:262
Available since v1.5.0
import { runInDebug } from '@ember/debug';
- func
- Function
- The function to be executed.
Run a function meant for debugging.
Calls to this function are removed from production builds, so they can be freely added for documentation and debugging purposes without worries of incuring any performance penalty.
import Component from '@ember/component'; import { runInDebug } from '@ember/debug'; runInDebug(() => { Component.reopen({ didInsertElement() { console.log("I'm happy"); } }); });
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/3.25/functions/@ember%2Fdebug/runInDebug