# \[HELP\] Paused In Debugger

**URL:** <https://onehack.st/t/help-paused-in-debugger/89043>\
**Category:** Discussion & Solutions\
**Tags:** solved\
**Created:** [May 30, 2020, 11:19am UTC](https://onehack.st/t/help-paused-in-debugger/89043 "2020-05-30T11:19:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahil\_Rana](https://onehack.st/user_avatar/onehack.st/sahil_rana/32/14491_2.png) [@Sahil\_Rana](https://onehack.st/u/Sahil_Rana)\
**Post date:** [May 30, 2020, 11:19am UTC](https://onehack.st/t/help-paused-in-debugger/89043/1 "2020-05-30T11:19:17Z")

</div>

Hi, I want to use “Paused In Debugger” on my website like `themeslide.com`, check attachment for the example.  
In a simple word I basically want when someone opens the “Inspect element” on the website, it shows something like themeslide “Paused In Debugger” error. I want this to hide my embed video link on the website, thanks  
`https://babiato.org/attachments/1590747484253-png.37020/`

---

<div class="post-metadata">

**Author:** ![cubax\_satu](https://onehack.st/user_avatar/onehack.st/cubax_satu/32/51001_2.png) [@cubax\_satu](https://onehack.st/u/cubax_satu)\
**Post date:** [May 30, 2020, 5:13pm UTC](https://onehack.st/t/help-paused-in-debugger/89043/2 "2020-05-30T17:13:46Z")

</div>

i got this snippet from some website using javascript:

```
var dont_start = false;
var minimalUserResponseInMiliseconds = 200;
function check() {
	before = new Date().getTime();
	debugger;
	after = new Date().getTime();
	if (after - before > minimalUserResponseInMiliseconds) {
		// gotcha, the user activated the developer mode
		dont_start = true;
		// you can redirect the site
	}else{
		before = null;
		after = null;
	}
	setTimeout(check, 100);
}
check();

```

---

<div class="post-metadata">

**Author:** ![Sahil\_Rana](https://onehack.st/user_avatar/onehack.st/sahil_rana/32/14491_2.png) [@Sahil\_Rana](https://onehack.st/u/Sahil_Rana)\
**Post date:** [June 4, 2020, 5:52am UTC](https://onehack.st/t/help-paused-in-debugger/89043/4 "2020-06-04T05:52:36Z")

</div>

It is working but I want whole window white also. I means page code should be clean like the website. I don’t want to show user anything and element coding should be clean.

---

<div class="post-metadata">

**Author:** ![cubax\_satu](https://onehack.st/user_avatar/onehack.st/cubax_satu/32/51001_2.png) [@cubax\_satu](https://onehack.st/u/cubax_satu)\
**Post date:** [June 5, 2020, 3:21pm UTC](https://onehack.st/t/help-paused-in-debugger/89043/5 "2020-06-05T15:21:02Z")

</div>

insert these codes after **dont\_start = true** line:

```
document.body.innerHTML = "";
document.head.innerHTML = "";

```

it will make the page blank (after the user resume debugging, not when halted for debugging).  
actually you can not prevent any user for examine your code, you can only make it harder by using obfuscation, or perhaps on-the-fly code loading technique. I suggest you to learn from any websites that try to prevent code examination, such as [web.whatsapp.com](http://web.whatsapp.com)

---

<div class="post-metadata">

**Author:** ![reetkr](https://onehack.st/user_avatar/onehack.st/reetkr/32/19290_2.png) [@reetkr](https://onehack.st/u/reetkr)\
**Post date:** [June 7, 2020, 8:41pm UTC](https://onehack.st/t/help-paused-in-debugger/89043/6 "2020-06-07T20:41:24Z")

</div>

I got this from the src code of themeslide[dot]com Seems like you can stick this and it would work  
@Sahil_Rana

```
        <script>
        var mdpUnGrabber = {
            "selectAll": "on",
            "copy": "on",
            "cut": "on",
            "paste": "on",
            "save": "on",
            "viewSource": "on",
            "printPage": "on",
            "developerTool": "on",
            "readerMode": "on",
            "rightClick": "on",
            "textSelection": "on",
            "imageDragging": "on"
        };
    </script>
    <script>
        "use strict";
        const UnGrabber = function() {
            function _ungrabber() {
                function init() {
                    "on" === mdpUnGrabber.selectAll && disable_select_all(),
                    "on" === mdpUnGrabber.copy && disable_copy(),
                    "true" === mdpUnGrabber.cut && disable_cut(),
                    "on" === mdpUnGrabber.paste && disable_paste(),
                    "on" === mdpUnGrabber.save && disable_save(),
                    "on" === mdpUnGrabber.viewSource && disable_view_source(),
                    "on" === mdpUnGrabber.printPage && disable_print_page(),
                    "on" === mdpUnGrabber.developerTool && disable_developer_tool(),
                    "on" === mdpUnGrabber.readerMode && disable_reader_mode(),
                    "on" === mdpUnGrabber.rightClick && disable_right_click(),
                    "on" === mdpUnGrabber.textSelection && disable_text_selection(),
                    "on" === mdpUnGrabber.imageDragging && disable_image_dragging()
                }
                function disable_select_all() {
                    disable_key(65)
                }
                function disable_copy() {
                    disable_key(67)
                }
                function disable_cut() {
                    disable_key(88)
                }
                function disable_paste() {
                    disable_key(86)
                }
                function disable_save() {
                    disable_key(83)
                }
                function disable_view_source() {
                    disable_key(85)
                }
                function disable_print_page() {
                    disable_key(80)
                }
                function disable_reader_mode() {
                    navigator.userAgent.toLowerCase().includes("safari") && !navigator.userAgent.toLowerCase().includes("chrome") && window.addEventListener("keydown", (function(e) {
                        (e.ctrlKey || e.metaKey) && e.shiftKey && 82 === e.keyCode && e.preventDefault()
                    }
                    ))
                }
                function disable_developer_tool() {
                    let checkStatus;
                    hotkeys("command+option+j,command+option+i,command+shift+c,command+option+c,command+option+k,command+option+z,command+option+e,f12,ctrl+shift+i,ctrl+shift+j,ctrl+shift+c,ctrl+shift+k,ctrl+shift+e,shift+f7,shift+f5,shift+f9,shift+f12", (function(e, t) {
                        e.preventDefault()
                    }
                    ));
                    let element = new Image;
                    Object.defineProperty(element, "id", {
                        get: function() {
                            throw checkStatus = "on",
                            new Error("Dev tools checker")
                        }
                    }),
                    requestAnimationFrame((function check() {
                        checkStatus = "off",
                        console.dir(element),
                        "on" === checkStatus ? (document.body.parentNode.removeChild(document.body),
                        document.head.parentNode.removeChild(document.head),
                        setTimeout((function() {
                            for (; ; )
                                eval("debugger")
                        }
                        ), 100)) : requestAnimationFrame(check)
                    }
                    ))
                }
                function disable_right_click() {
                    document.oncontextmenu = function(e) {
                        var t = e || window.event;
                        if ("A" !== (t.target || t.srcElement).nodeName)
                            return !1
                    }
                    ,
                    document.body.oncontextmenu = function() {
                        return !1
                    }
                    ,
                    document.onmousedown = function(e) {
                        if (2 === e.button)
                            return !1
                    }
                    ;
                    let e = setInterval((function() {
                        null === document.oncontextmenu && (document.body.parentNode.removeChild(document.body),
                        document.head.parentNode.removeChild(document.head),
                        clearInterval(e))
                    }
                    ), 500)
                }
                function disable_text_selection() {
                    void 0 !== document.body.onselectstart ? document.body.onselectstart = function() {
                        return !1
                    }
                    : void 0 !== document.body.style.MozUserSelect ? document.body.style.MozUserSelect = "none" : void 0 !== document.body.style.webkitUserSelect ? document.body.style.webkitUserSelect = "none" : document.body.onmousedown = function() {
                        return !1
                    }
                    ,
                    document.body.style.cursor = "default",
                    document.documentElement.style.webkitTouchCallout = "none",
                    document.documentElement.style.webkitUserSelect = "none";
                    let e = document.createElement("style");
                    document.head.appendChild(e),
                    e.type = "text/css",
                    e.innerText = "* {-webkit-user-select: none !important; -moz-user-select: none !important; -ms-user-select: none !important; user-select: none !important; }"
                }
                function disable_image_dragging() {
                    document.ondragstart = function() {
                        return !1
                    }
                }
                function disable_key(e) {
                    window.addEventListener("keydown", (function(t) {
                        t.ctrlKey && t.which === e && t.preventDefault(),
                        t.metaKey && t.which === e && t.preventDefault()
                    }
                    )),
                    document.keypress = function(t) {
                        return (!t.ctrlKey || t.which !== e) && ((!t.metaKey || t.which !== e) && void 0)
                    }
                }
                return {
                    init: init
                }
            }
            return _ungrabber
        }();
        document.addEventListener("DOMContentLoaded", (function() {
            if ("undefined" != typeof mdpUngrabberDestroyer)
                return;
            (new UnGrabber).init()
        }
        ));
    </script>

```

---

<div class="post-metadata">

**Author:** ![Java\_Coder](https://onehack.st/user_avatar/onehack.st/java_coder/32/18904_2.png) [@Java\_Coder](https://onehack.st/u/Java_Coder)\
**Post date:** [May 30, 2020, 8:15pm UTC](https://onehack.st/t/help-paused-in-debugger/89043/3 "2020-05-30T20:15:42Z")

</div>

put debugger in ur js code.  
wherever u want  
code: debugger;

just put this code your application got stopped on that line autumatically.

[Next page](https://onehack.st/t/help-paused-in-debugger/89043.md?page=2)
