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

Add examples to debugging docs #5555

Merged
merged 3 commits into from
May 4, 2019
Merged

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Apr 5, 2019

Description

Partially stolen from @drashna on discord and #5498, I have added some useful examples on how to debug after enabling debug, as well as mentioning hid_listen as an alternative to QMK Toolbox.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@zvecr zvecr force-pushed the feature/debug_docs_examples branch from f83f7f2 to 60f80e9 Compare April 5, 2019 01:50
Copy link
Contributor

@ezuk ezuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff! just a couple of tiny things :)

docs/newbs_testing_debugging.md Outdated Show resolved Hide resolved
docs/newbs_testing_debugging.md Outdated Show resolved Hide resolved
@Lenbok
Copy link
Contributor

Lenbok commented Apr 7, 2019

One thing I have been confused about is all the printf varieties. E g. Some examples here use xprintf but that isn't in the list given above. Could you add an explanation about that?

@drashna
Copy link
Member

drashna commented Apr 7, 2019

"it's complicated".

It changes how/where printing happens...
If you check /tmk_core/common/print.h, that changes how/what is defined.

@zvecr
Copy link
Member Author

zvecr commented Apr 8, 2019

@Lenbok I would be happy to do a 2nd pass with more info once its been collated, but i would rather keep the scope of this PR to examples I have actually used, and are confident on its implementation.

@Lenbok
Copy link
Contributor

Lenbok commented Apr 8, 2019

I think it's making things more confusing in a document aimed at newbs to be adding a key logging example making use of a xprintf function that wasn't in the set of ones described literally only a few lines above. Is there a reason why that example doesn't use the uprintf function listed? It sounds like you're not confident that uprintf would work - if you want I'll test that tonight, and then maybe we can just update that example to be consistent.

@zvecr
Copy link
Member Author

zvecr commented Apr 8, 2019

I was not my confidence in xprintf vs uprintf, more that i did not want to add docs for xprintf when i had also not heard of it. That being said, i totally agree that uprintf is more consistent and have also updated and verified its behaviour.

@zvecr zvecr force-pushed the feature/debug_docs_examples branch from 618e55d to 10499ac Compare May 2, 2019 01:00
@zvecr
Copy link
Member Author

zvecr commented May 2, 2019

Anything i can do to push this over the finish line?

Copy link
Contributor

@yanfali yanfali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drashna
Copy link
Member

drashna commented May 4, 2019

Thanks!

@drashna drashna merged commit da995d2 into qmk:master May 4, 2019
foosinn pushed a commit to foosinn/qmk_firmware that referenced this pull request May 6, 2019
* Add examples to debugging docs

* Add examples to debugging docs - review comments

* Update matrix keypress example to use uprintf
KauyonKais pushed a commit to KauyonKais/qmk_firmware that referenced this pull request May 8, 2019
* Add examples to debugging docs

* Add examples to debugging docs - review comments

* Update matrix keypress example to use uprintf
KauyonKais pushed a commit to KauyonKais/qmk_firmware that referenced this pull request May 8, 2019
* Add examples to debugging docs

* Add examples to debugging docs - review comments

* Update matrix keypress example to use uprintf
Timbus pushed a commit to Timbus/qmk_firmware that referenced this pull request Jun 23, 2019
* Add examples to debugging docs

* Add examples to debugging docs - review comments

* Update matrix keypress example to use uprintf
ridingqwerty pushed a commit to ridingqwerty/qmk_firmware that referenced this pull request Jan 10, 2020
* Add examples to debugging docs

* Add examples to debugging docs - review comments

* Update matrix keypress example to use uprintf
JeffreyPalmer pushed a commit to JeffreyPalmer/qmk_firmware that referenced this pull request Feb 27, 2020
* Add examples to debugging docs

* Add examples to debugging docs - review comments

* Update matrix keypress example to use uprintf
@zvecr zvecr deleted the feature/debug_docs_examples branch April 28, 2020 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants