google-chromegoogle-chrome-devtools

Can't paste code in Chrome DevTools even after typing {PH1} to allow pasting


Today, I was trying to run code in the Chrome DevTools console (on macOS). While I was pasting a class-name, I got an error message:

Warning: Do not paste code into the DevTools console that you do not understand or that you have not checked yourself. Such code may allow attackers to steal your identity or take over your computer. Type {PH1} below to allow pasting.

I tried following the instructions, by typing {PH1} and after that PH1. Both don't work; I have gotten the error message: VM876:1 Uncaught ReferenceError: PH1 is not defined at :1:3

Screenshots with attempts and errors.

I feel silly for even asking this, but I really don't know; what should I do so that I can execute code in Chrome DevTools again?


Solution

  • Short answer:

    Type plakken toestaan to enable the paste function.

    Explanation:

    Based on your warning message, it looks like you're using Chrome in Dutch (Nederlands). I believe that this placeholder, "{PH1}", is where the version of "allow pasting" should appear in your language, but it doesn't seem to have been translated yet by the Chrome team.

    I had the same problem (my system is in Portuguese) and solved it with the help of this post. After changing the text language to Portuguese, I discovered that in my case I had to type "permitir colar" to enable the paste feature in the console.