GithubHelp home page GithubHelp logo

Comments (6)

Maizify avatar Maizify commented on September 9, 2024

这个似乎并没有很好的办法,要接管 console.log() 行为必然会导致入侵原生设定。
在电脑上调试的时候,可以先不加载 vConsole……

from vconsole.

memotail avatar memotail commented on September 9, 2024

可以通过其他方式调试。别用console.log('test'),
1、 改为console.dir('test'),因为vconsole目前没接管console.dir。
2、临时debug的时候,可以使用console.error('test');error会出现堆栈信息,点开就能看到你代码行位置。当然,用完记得删掉,免得红色一篇。

from vconsole.

oliverzy avatar oliverzy commented on September 9, 2024

好吧,看来是不太好解决,能否给vConsole增加一个初始化方法,可以让用户根据情况比如一个url参数来决定是否要启用vConsole,因为页面JS是预先打包好的上传到CDN的

from vconsole.

memotail avatar memotail commented on September 9, 2024

我也是使用者,我之前看过代码,发现只要引用就会调用。

但我也是集成在项目中,通过模块化方式引用就好,触发条件,自己控制。如你所需,你可以每次刷新页面时候,添加个判断url,若满足条件,按需引用加载vConsole,就完事了

from vconsole.

raphealguo avatar raphealguo commented on September 9, 2024

@oliverzy 这个参数你可以自己定义,例如用php的话(其他语言同理,自己判断参数之后再输出到html里边):

from vconsole.

XinChou16 avatar XinChou16 commented on September 9, 2024

Chrome 设置中的 ignore List 添加配置即可,添加这一项:/vconsole\-3\.3\.4\.min\.js\b
匹配模式为你的文件名,你可以根据具体文件名来设置
https://juejin.cn/post/6974564001657143333
image

from vconsole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.