Function
runInDebug (func) public
Module:
@ember/debug
Defined in packages/@ember/debug/index.ts:264
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.
1 2 3 4 5 6 7 8 9 10 |
import Component from '@ember/component'; import { runInDebug } from '@ember/debug'; runInDebug(() => { Component.reopen({ didInsertElement() { console.log("I'm happy"); } }); }); |