-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Reduce verbose "flush" message when using standalone tool #1151
Comments
I have the same issue. My use case is building a Chrome extension. Version5.3.3 Browser and OS infoChrome 79 / OSX 10.12.6 (Sierra) Steps to reproduceSet up the Vue application to connect to Devtools and run in development mode: if (process.env.NODE_ENV === 'development') {
require('@vue/devtools').connect()
} What is expected?Devtools should connect and do its thing. What is actually happening?Devtools connects, but then fills my application console with a slew of continuous debugging information, which masks my own console logs:
Looking through most of the source code where Devtools spits out stats, it seems that these conditionals should be referencing some kind of option, not whether the host app is in development mode: // rather than...
if (process.env.NODE_ENV !== 'production') {
console.log(`[flush] serialized ${captureCount} instances${isBrowser ? `, took ${window.performance.now() - start}ms.` : ''}.`)
}
// something like...
if (options.debug) {
console.debug(...)
} https://github.com/vuejs/vue-devtools/blob/dev/packages/app-backend/src/index.js#L296-L298 The |
Indeed there should be an option rather than writing environment judging |
I'm pulling together a PR right now. Hopefully the team will be able to review it promptly and suggest changes if my suggestions are not to their taste. EDIT: Hmmm. The code changes are straightforward, but I can't get the build to run to test them. |
I've solved it for now by doing a find and replace on the package folder from |
Any movement on this update? Do you need any help? |
+1 |
Hi @Akryum, no updates to the lib since last year. Are there any updates on this? |
Hey @Zhwt @aolsx @guanzo @matsieftw ... I suspect this won't get patched, so I solved it by adding a Install: npm i --save-dev replace-in-file Update
Add const replace = require('replace-in-file')
replace({
files: 'node_modules/@vue/devtools/build/backend.js',
from: /console\.log/g,
to: 'console.debug',
}) Run if already installed: npm run postinstall This modifies the installed background script to filter all verbose debug messages from the console as @Zhwt suggested in his original post. Obviously, you need to be running the local install configuration for this to work, but I suspect you will be in your associated extension / electron projects, etc... |
i have the same problem wit vue-devtools standalone i work also in an iframe |
It was at 6000 a moment ago before the page reloaded: @cannap use the fix I posted above and you'll be good. |
@davestewart this is working like a charm! tx. This should be the "standard" for devtools and not a postinstall plugin, though. I'm wondering why this isn't included yet! |
This never happened to me before until now. I didn't even change my code, nor did I update the vue-devtools package. It's really unproductive! |
Is this project not supported anymore? Something as simple as turning off verbose debugging has sat open for 18 months. It makes using the standalone version of the app unbearable. Sure there are some hacks to get around it, but come on. |
Thanks so much for revisiting this @Akryum ! |
Why is this still happening in 2021? |
Why is this still happening in 2022? |
@Akryum why close an issue the community clearly wants a solution for? |
Because a fix to the issue was released in August 2021. 👀 If you are somehow still experiencing this issue (those console logs are not shipped anymore in either the browser extensions nor the electron app), please open a bug report with reproduction. Proof: The |
Version
5.3.3
Browser and OS info
Firefox 72.0.1 / Windows 10
Steps to reproduce
What is expected?
The output "flush" message can be reduced if I change some setting while the application still running in development mode.
What is actually happening?
The "flush" messages flush the console output and make the useful information becomes relatively difficult to find.
The most obvious case is when using element-ui and build some tables that contains transition animation, most time it's ok but sometimes the messages become so much that make it a little annoying.
The https://github.com/vuejs/vue-devtools/blob/30f15164aabf216b4fcd4b147c2377e598380912/packages/app-backend/src/index.js#L297 line should be change to
console.debug()
instead ofconsole.log()
so people can turn it off by change dev console's filter settings.The text was updated successfully, but these errors were encountered: