Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在真机上查看控制台的各种信息 #21

Open
lovelmh13 opened this issue Mar 15, 2020 · 0 comments
Open

在真机上查看控制台的各种信息 #21

lovelmh13 opened this issue Mar 15, 2020 · 0 comments

Comments

@lovelmh13
Copy link
Owner

eruda

eruda 可以在真机上面直接查看控制台,console、network、dom、css等,但是不支持断点调试。可以用来查看不同机器上面出现的问题

可以直接引入:

<script type="text/javascript" src="https://cdn.bootcss.com/eruda/1.2.6/eruda.min.js"></script>

<script>eruda.init();</script>

也支持Npm的方式

注: 在使用eruda.init();也可以做一些判断,在需要的时候再使用eruda
例如:

(function () {
    if (!/mdebug=true/.test(window.location.href)) return;
    var script = document.createElement('script')
    script.src = "https://cdn.bootcss.com/eruda/1.2.6/eruda.min.js"
    script.async = true
    document.getElementsByTagName('head')[0].appendChild(script)
    script.onload = function () {
        eruda.init()
    }
})()

可以看一下eruda,移动端网页调试神器

vconsole

移动端使用vConsole真机调试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant