This page is not available in every language. Missing translations are disabled in the language selector.

Quick reference

Weinre Cheatsheet

A quick reference guide for Weinre remote web inspector: installation, running the debug server, and client script injection.

· Published

weinre (WEb INspector REmote) is a debugger for web pages on mobile devices, enabling remote DOM and console inspection.

Note: Weinre is an archived project that has been largely superseded by modern browser remote debugging tools.

Usage

Installation

npm install -g weinre

Starting the Server

weinre --boundHost 0.0.0.0
open http://localhost:8080

HTML Script Injection

Inject this script into the page you wish to inspect:

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=1;js.src='http://'+location.hostname+':8080/target/target-script-min.js#anonymous';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weinre');</script>

References

Related topics