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

Delayed debug output #444

Open
jkavalec opened this issue Jan 19, 2024 · 3 comments
Open

Delayed debug output #444

jkavalec opened this issue Jan 19, 2024 · 3 comments

Comments

@jkavalec
Copy link

jkavalec commented Jan 19, 2024

When I use dprintf statement to output some debug information, this is always delayed.

Example:

  • have debug statement right before tap_code16()
  • I press the action
  • In QMK toolbox I immediately see that some keys were pressed (via those matrix outputs, that I would like to disable and see only my debug statements, but that is another matter)
  • Keyboard issues the command and I see it in my editor immediately
  • since the tap_code16 was already executed, I would expect my debug statement being printed immediately, this is sadly not so
  • I then bash keyboard randomly and sometimes sooner sometimes later , 2-10 presses I'd say, the print statement finally shows in the Toolbox

What could be the problem? I had this happening on both Mac and Windows, (ATmega32U4 Board) and it makes debugging pretty hard

@fauxpark
Copy link
Member

Make sure your print statements end in a newline character. The toolbox will not output anything until it receives a complete line.

@jkavalec
Copy link
Author

Thank you for good advice.

This did help, and it is now usable, yet the output is always delayed by 1 press, so when action takes place and print statement is issued, it always takes one additional press to get the output.

@fauxpark
Copy link
Member

Impossible to tell what's wrong without seeing your code.

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

2 participants