https://www.w3schools.com/js/js_debugging.asp
อ้างถึง
The debugger Keyword
The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function.
This has the same function as setting a breakpoint in the debugger.
If no debugging is available, the debugger statement has no effect.
With the debugger turned on, this code will stop executing before it executes the third line.
The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function.
This has the same function as setting a breakpoint in the debugger.
If no debugging is available, the debugger statement has no effect.
With the debugger turned on, this code will stop executing before it executes the third line.
https://developer.mozilla.org/...ents/debugger?retiredLocale=th
อ้างถึง
When the debugger is invoked, execution is paused at the debugger statement. It is like a breakpoint in the script source.
การทำงานมันก็แค่ทำให้สคริปต์ (JS) หยุดทำงานต่อตรงบรรทัดนั้น เท่านั้นเอง. เมื่อผู้ใช้กด ข้ามเพื่อให้ JS ทำงานขั้นต่อไป หรือกดเพลย์แล้วเท่านั้นแหละ มันถึงจะเริ่ม redirect แต่ถ้าผู้ใช้ไม่กดทั้งสองปุ่มนี้ซะอย่าง มันก็คือเปิด developer tool, debugging tool ธรรมดาๆเลยไม่ได้กันอะไร ก็มองเห็นเหมือนเดิมครับ.