npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adb-devtools

v1.0.42

Published

adb remote debug tools

Downloads

50

Readme

使用说明

安装

npm install adb-devtools -g

Android 真机调试支持

Android 设备打开 usb 调试模式,并通过了授权

授权

接线连接 android 手机,启动小程序后执行 devtools 会自动打开 chrome 进行调试

或者使用 devtools -s 打开 http://localhost:8090/ 点击对应的智能小程序链接

IOS 真机调试支持

MacOS,需要先安装homebrew

brew install ios-webkit-debug-proxy

ios 设备通过 "设置" -> "Safari 浏览器" -> "高级" -> "Web 检查器" 打开

Windows 未测试,暂不支持

命令参数

Usage: devtools [options]

Options:

-V, --version            output the version number
-u, --upload             upload preload files to android
-s, --start-server       start inspector server
-p, --port [number]      set server port (default: 8090)
-f, --prefix [string]    debug webview type prefix (default: webview)
-d, --server-dir [path]  the root path of inspector server (default: /usr/local/lib/node_modules/adb-devtools/node_modules/devtools-frontend)
-n, --new-server-dir     use the newest chrome devtools frontend
-h, --help               output usage information

调试服务器

devtools -s 

打开 inspector 的 web 服务,用户可以通过打开 http://localhost:8090/ 列出所有已连接设备的可调试 webview 页面

其中 '智能小程序' 的链接是专门针对手机百度智能小程序做了特殊处理,可以实时的根据小程序的生存期自动连接对应的调试页面

参数使用示例

启动静态服务器

devtools -s -p 8090 

使用新版的 chrome inspector 界面

devtools -n 

默认使用的是 chrome 48 ,加上 -n 的参数后使用最新版的 chrome 调试界面 (当前是 chrome 69)

调试指定的移动浏览器类型

devtools -f webview 

通过在命令行里面执行 adb shell cat /proc/net/unix | grep --text _devtools_remote 可以发现,不同的移动浏览器返回的结果可能不一样。 如 @webview_devtools_remote 的形式 (_devtools_remote 的前缀是 webview) ,因此提供 -f 来指定类型。

将 preload 的 JS 文件上传到 android 手机的 /sdcard/ 目录下

devtools -u 

默认每次执行 devtools 都会上传覆盖

其他

真机调试技术方案