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

Controller QJSEngine: Several Console API commands doesn't behave as expected #11080

Open
JoergAtGithub opened this issue Nov 19, 2022 · 3 comments
Labels

Comments

@JoergAtGithub
Copy link
Member

Bug Description

Mixxx uses the console apie extension of the QJSEngine for controller mappings ( https://doc.qt.io/qt-5/qtquick-debugging.html#console-api )

While working on #4718 I noticed that several console functions don't work as expected:

  • console.trace() No output at all
  • console.assert(condition, message) Expected output in the console with --controller-debug (critical message followed by stack trace) but no error dialog.
  • console.exception(message) Expected output in the console with --controller-debug (critical message followed by stack trace) but no error dialog.

Version

2.4

OS

Windows 11

@Swiftb0y
Copy link
Member

Maybe the output of those is somehow tied to the log-level?

@JoergAtGithub
Copy link
Member Author

I found out, that console.trace() doesn't use the logging category "js", as the as console commands, but "default".

If I add the category name "default" as additional condition to

if (categoryName == jsLoggingCategory ||
categoryName.substr(0,
std::min(categoryName.size(),
controllerLoggingCategoryPrefix.size())) ==
controllerLoggingCategoryPrefix) {
// If the logging category name starts with `controller.`, show debug messages.
category->setEnabled(QtDebugMsg, true);
} else {

the output of console.trace() works.

But I could imagine, that this generates spam elsewhere.

@JoergAtGithub
Copy link
Member Author

https://bugreports.qt.io/browse/QTBUG-108673

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

No branches or pull requests

2 participants