New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

web-debug-cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-debug-cli

web page one-stop remote network debugger

latest
Source
npmnpm
Version
1.2.233
Version published
Weekly downloads
15
-11.76%
Maintainers
1
Weekly downloads
 
Created
Source

关于web-debug-cli

依赖包参考前端大佬写的依赖包封装了 三个类库编写自定义扩展插件

  • 参考地址
  • npm npm Build Status

安装

Windows 下

    npm install web-debug-cli -g

Mac 下

    sudo npm install web-debug-cli -g

三分钟上手

第一步:手机和PC保持在同一网络下(比如同时连到一个Wi-Fi下)

第二步:命令行输入web-debug-cli,按命令行提示用浏览器打开相应地址。

第三步:设置手机的HTTP代理,代理IP地址设置为PC的IP地址,端口为web-debug-cli的启动端口(默认端口:9888)。

  • Android设置代理步骤:设置 - WLAN - 长按选中网络 - 修改网络 - 高级 - 代理设置 - 手动
  • iOS设置代理步骤:设置 - 无线局域网 - 选中网络 - HTTP代理手动

第四步:手机安装证书。注:手机必须先设置完代理后再通过(非微信)手机浏览器访问http://s.xxx(地址二维码)安装证书(手机首次调试需要安装证书,已安装了证书的手机无需重复安装)。iOS新安装的证书需要手动打开证书信任(不安装也可以 可跳过)

第五步:用手机浏览器访问你要调试的页面即可。

自定义选项

端口

(默认端口:9888)

web-debug-cli -p 8888

设置外部代理(默认使用AnyProxy)

web-debug-cli -e http://127.0.0.1:8888

web-debug-cli内置AnyProxy提供抓包功能,但是也可通过设置外部代理和其它抓包代理工具一起使用,如:Charles、Fiddler。

设置页面内容为可编辑模式

该功能使页面内容修改更加直观方便。 (默认: false)

web-debug-cli -w true

内部实现原理:在需要调试的页面内注入代码:document.body.contentEditable=true。暂不支持使用了iscroll框架的页面。

是否允许weinre监控iframe加载的页面

(默认: false)

web-debug-cli -i true

是否只拦截浏览器发起的https请求

(默认: true)

web-debug-cli -b false

有些浏览器发出的connect请求没有正确的携带userAgent,这个判断有时候会出错,如UC浏览器。这个时候需要设置为false。大多数情况建议启用默认配置:true,由于目前大量App应用自身(非WebView)发出的请求会使用到SSL pinning技术,自定义的证书将不能通过app的证书校验。

是否允许HTTP缓存

(默认: false)

web-debug-cli -c true

是否允许weinre日志打印报错信息debuglog

(默认: false)

web-debug-cli -d true

更多

  • 修复weinrenode.js V7版本会崩溃的bug

  • weinre在页面document ready事件前,无法打印console.log日志进行了增强修复。

  • 增强weinre打印未捕获异常(Uncaught Exceptions)功能。

  • web-debug-cli原理是集成了weinre,简化了weinre需要给每个调试的页面添加js代码。web-debug-cli原理是拦截所有html页面请求注入weinre所需要的js代码。让页面调试更加方便。

Keywords

web

FAQs

Package last updated on 04 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts