Earlier quoted context omitted.
Can you make one for Firefox too? ;-)
it's a simple script, should be portable to firefox with minor modifications. The source code is available on Github [0]. 0: https://github.com/Andrews54757/Anti-Anti-Debug
In Firefox, when a console is cleared, it's not just the display that's cleared. The entire console object is reset. This means that any modifications made to the console object, such as redefining console.clear(), are lost when console.clear() is called.
You can try this on this demo [1] website that uses devtools-detector library [2]