-
Notifications
You must be signed in to change notification settings - Fork 3k
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
vConsole会破坏系统原生console.log的显示打log处文件名和行号的行为 #79
Comments
这个似乎并没有很好的办法,要接管 console.log() 行为必然会导致入侵原生设定。 |
可以通过其他方式调试。别用console.log('test'), |
好吧,看来是不太好解决,能否给vConsole增加一个初始化方法,可以让用户根据情况比如一个url参数来决定是否要启用vConsole,因为页面JS是预先打包好的上传到CDN的 |
我也是使用者,我之前看过代码,发现只要引用就会调用。 但我也是集成在项目中,通过模块化方式引用就好,触发条件,自己控制。如你所需,你可以每次刷新页面时候,添加个判断url,若满足条件,按需引用加载vConsole,就完事了 |
@oliverzy 这个参数你可以自己定义,例如用php的话(其他语言同理,自己判断参数之后再输出到html里边): |
Chrome 设置中的 ignore List 添加配置即可,添加这一项: |
加载了vConsole之后,所有的console.log调用在系统控制台里面显示的文件名和行号都变成了vConsole.min.js:1,而不是显示相应的文件名和行号了
The text was updated successfully, but these errors were encountered: