When we develop a mobile Web page, we often get the following scenario:
(1) Development, in their own computer running well, on the phone to open on the hanging, but the phone can not see the error log;
(2) After the launch, a user indicates that the page is out of line, but we do not reappear, see the user side of the error message.
if (1) can also be connected to the mobile phone through the computer to view the log to solve, that (2) in the absence of a perfect front-end escalation system is very passive.
As a developer, our appeal is simple: is there a quick way to see the log logs on the front page of the phone?
The answer is yes.
Vconsole: A lightweight, scalable, front-end developer debug panel for mobile Web pages.
How to use
Download the latest version of Vconsole. (Do not download dist/vconsole.min.js directly under the dev branch)
Or use NPM to install:
NPM Install Vconsole
Introduced dist/vconsole.min.js
into the project:
12345 |
<script src= "path/to/vconsole.min.js" ></script> <script> console.log( ‘Hello world‘ ); // 然后点击右下角 vConsole 按钮即可查看到 log </script> |
If you are installing via NPM, a project that uses Webpack can be referenced by this in main.js:
Let Vconsole = require (' Vconsole '); new Vconsole (); You can then view the print on the mobile side via the console
Mobile phone front-end development and debugging tool –vconsole