weinre (WEb INspector REmote)는 모바일 기기 상의 웹 페이지 DOM 및 콘솔을 원격으로 점검할 수 있는 디버거입니다.
참고: Weinre는 아카이브된 프로젝트이며 현재는 최신 브라우저의 원격 디버깅 도구로 대체되었습니다.
사용법
설치
npm install -g weinre
서버 시작
weinre --boundHost 0.0.0.0
open http://localhost:8080
HTML 스크립트 삽입
디버깅하려는 웹 페이지에 다음 스크립트를 삽입합니다:
<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>