9

I find script pause debugger in chrome when ctrl shift I or F12. Thank everybody!

2 Answers 2

13

Type debugger; in your js where you want debugger to pause:

Type debugger Screenshot

Then load the page while developer tools open.

Paused Screenshot

2

Open the Devtools, you can find a tab called Sources in which press ctrl + P and enter the name of the js file you want to debug. Once you open the file, go to the line where you want to debug. Click on the line number at the point to setup a debug point. You can setup Multiple Debugging points the same way too. When the code is called the debugger will pause at the point specified.

Alternatively, In your js code you can specify debugger; which will pause the debugger at the location you want.

3
  • No, i have a website and I want user can't use F12 on my website
    – justcntt
    Commented Jun 25, 2017 at 17:00
  • @justcntt It is not possible to completely block users from using F12. Thats how it is.
    – Neovire
    Commented Jun 25, 2017 at 17:04
  • this would be a related post stackoverflow.com/questions/7559409/…
    – Neovire
    Commented Jun 25, 2017 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.