Add a debug mode
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -409,6 +409,8 @@ class Runtime extends EventEmitter {
|
||||
warpTimer: false
|
||||
};
|
||||
|
||||
this.debug = false;
|
||||
|
||||
this._animationFrame = this._animationFrame.bind(this);
|
||||
this._animationFrameId = null;
|
||||
this._lastStepTime = Date.now();
|
||||
@@ -2387,6 +2389,11 @@ class Runtime extends EventEmitter {
|
||||
});
|
||||
}
|
||||
|
||||
enableDebug () {
|
||||
this.resetAllCaches();
|
||||
this.debug = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit glows/glow clears for scripts after a single tick.
|
||||
* Looks at `this.threads` and notices which have turned on/off new glows.
|
||||
|
||||
@@ -252,6 +252,10 @@ class VirtualMachine extends EventEmitter {
|
||||
this.runtime.setCompilerOptions(compilerOptions);
|
||||
}
|
||||
|
||||
enableDebug () {
|
||||
this.runtime.enableDebug();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop all threads and running activities.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user