Several methods of JS debug skipping

Several methods of JS debug skipping

The first anti-debugging solution: Disable the breakpoint method

禁用所有断点,包括自己打的断点,无法调式。

insert image description here

The second anti-debugging solution: never execute method

在debug处 点击右键,选择 Nerver pause here,点击确定。

insert image description here

The third anti-debugging solution: conditional breakpoint method

在debug处 点击右键,选择 Add conditional breakpoint,然后输入 false,添加false条件。

insert image description here

The fourth anti-debugging solution: empty function method

Find the debug method name, rewrite and replace it in the console, and leave it empty.

方法名 = function(){} 或者 function 方法名(){}

The fifth anti-debugging solution: local replacement method

Chrome 开发工具自带的 Override 可以实现本地替换。

insert image description here

The sixth anti-debugging solution: ReRes method

Google Store installation: https://chrome.google.com/webstore/detail/reres/gieocpkbblidnocefjakldecahgeeica?hl=zh-CN&gl=CN

After downloading the offline version, open it and drag chrome://extensions/it in to install it

After installation, chrome://extensions/find ReRes, check it 允许访问文件网址, and complete the configuration of ReRes.

After clicking to add a rule :

- **If URL match**: 一个正则表达式,当请求的URL与之匹配时,规则生效。注意:不要填开头的`/`和结束的`/gi`,如`/.*/gi`请写成`.*`
- **Response**: 映射的响应地址,这个地址会替换掉url中与上面正则匹配的部分。线上地址请以[http://开头,本地地址以file:///开头,比如](http://xn--%2Cfile-pk2hk90ca8l21sn8sl9w///开头,比如)`http://cssha.com`或`file:///D:/a.js`

After adding, click Save and reload the page. Note that you need to authorize read and write permissions.
insert image description here
Attach a Js debug debugging demo

function start_debug(){
    
    
    debugger;
}
console.log("start_debug");
var i=0;
while (i < 10){
    
    
    start_debug();
    i++;
    console.log("i:", i);
}
console.log("end_debug");

For details, please click https://github.com/annnhan/ReRes

The seventh anti-debugging solution: Fiddler green lightning method
fiddler green lightning icon replacement Dafa.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_43569396/article/details/131754868