Hacker News new | ask | show | jobs
by cpmsmith 1180 days ago
There are a couple of ways they can try to detect devtools being opened. As the sibling comment implies, the most popular way is to detect a sudden viewport resize, and you can avoid that by ensuring your devtools are set to open in a new window before opening them.

The only other ways I'm aware of are:

- Detecting the keyboard shortcut, ⌘⌥i or equivalent, which you can avoid by using the browser menu, and

- More riskily, evaluating a `debugger` statement and detecting whether evaluation paused. I'm not sure you could do anything about this one, but it would certainly be obvious to you whether it was happening.

1 comments

In firefox, you can disable `debugger` by deactivating all breakpoints, making `debugger` a noop.

Toggle the thing in the dotted rectangle: https://firefox-source-docs.mozilla.org/devtools-user/debugg...