Repository navigation
feat: opt-in debug logging (plugin-side) - #29
Merged
Merged
Conversation
This was referenced Jun 29, 2026
Three opt-in per-source detector-input aids (off by default), so the
plugin behaves like upstream until enabled:
- feature_flags.{h,cpp}: opt-in toggle infrastructure (draw_feature_enabled,
backed by QSettings) with FEATURE_CROP / FEATURE_ROTATE.
- draw.c: when enabled, the DRAW source gains Crop (L/T/R/B px) and a 180°
rotation, applied to the captured frame before the detector; plus a
'Preview detector input' toggle that renders the cropped/rotated frame in
the source itself (so the crop can be dialed in from the source's own
preview) instead of the detected-card overlay. Detection keeps running.
- SettingsDialog: 'Enable detector input crop' / 'Enable 180° input rotation'
toggles under 'Advanced features'.
- README + all translations and fr/ja locale strings.
Default (off) behaviour is identical to upstream.
Add an opt-in 'Enable debug logging' toggle (Advanced features, off by default) that surfaces diagnostics without code edits: - DrawDock: in debug mode, log the exact backend launch to the dock (resolved deck paths, channel, model, confidence, screen-time thresholds) and stop filtering the backend's stdout (show every line). - draw.c: in debug mode, log the resolved capture config to the OBS log (input source, source dimensions, crop, 180° rotation, channel). - feature_flags: FEATURE_DEBUG key. - SettingsDialog: the toggle. README + all translations document it. Plugin-side only; default (off) behaviour is unchanged.
leiteszeke
force-pushed
the
up/04-debug-mode
branch
from
October 11, 2026 14:05
83c703c to
0318b1d
Compare
…t's now the standard way to call cpp code from `draw.c` file also disable to button when the preview is live
…ing shared memory names
feat: opt-in detector input crop and 180° rotation
Three opt-in per-source detector-input aids (off by default), so the
plugin behaves like upstream until enabled:
- feature_flags.{h,cpp}: opt-in toggle infrastructure (draw_feature_enabled,
backed by QSettings) with FEATURE_CROP / FEATURE_ROTATE.
- draw.c: when enabled, the DRAW source gains Crop (L/T/R/B px) and a 180°
rotation, applied to the captured frame before the detector; plus a
'Preview detector input' toggle that renders the cropped/rotated frame in
the source itself (so the crop can be dialed in from the source's own
preview) instead of the detected-card overlay. Detection keeps running.
- SettingsDialog: 'Enable detector input crop' / 'Enable 180° input rotation'
toggles under 'Advanced features'.
- README + all translations and fr/ja locale strings.
Default (off) behaviour is identical to upstream.
Add an opt-in 'Enable debug logging' toggle (Advanced features, off by default) that surfaces diagnostics without code edits: - DrawDock: in debug mode, log the exact backend launch to the dock (resolved deck paths, channel, model, confidence, screen-time thresholds) and stop filtering the backend's stdout (show every line). - draw.c: in debug mode, log the resolved capture config to the OBS log (input source, source dimensions, crop, 180° rotation, channel). - feature_flags: FEATURE_DEBUG key. - SettingsDialog: the toggle. README + all translations document it. Plugin-side only; default (off) behaviour is unchanged.
…-debug-mode # Conflicts: # data/locale/en-US.ini # data/locale/fr-FR.ini # data/locale/ja-JP.ini # src/SettingsDialog.cpp # src/SettingsDialog.hpp # src/bridge.h
- draw.c: the debug log still printed rotate_180, which no longer exists (build error); log crop + channel only. - en-US.ini: restore the crop/preview labels from HichTala#28 that the master merge reverted. - README_jp.md: remove the duplicated Advanced features block. - READMEs: debug log details mention crop only (no rotation). - DrawDock.cpp: include bridge.h. - clang-format.
…-debug-mode # Conflicts: # data/locale/en-US.ini # readmes/README_jp.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in "Enable debug logging" toggle (Draw 2 settings → Advanced features, off by default) that surfaces the diagnostics needed to troubleshoot detection — without editing any code. Plugin-side only.
Changes
src/DrawDock.{cpp,hpp}— in debug mode, log the exact backend launch to the dock's log panel (the resolved deck-list paths, channel, model, confidence and screen-time thresholds) and stop filtering the backend's stdout, so every line shows.src/draw.c— in debug mode, log the resolved capture config to the OBS log (Help → Log Files): input source, source dimensions, crop (L/T/R/B), 180° rotation and channel.src/feature_flags.{h,cpp}—FEATURE_DEBUGkey.src/SettingsDialog.{cpp,hpp}— the toggle, under Advanced features.es/fr/jp/pt-br) document it.Why
Diagnosing a "nothing is detected" situation otherwise means guessing. With debug on, the dock immediately shows whether the deck paths resolved, what channel/thresholds were used, and the full backend output, while the OBS log shows the capture framing — turning a long back-and-forth into a glance.
Scope / risk
Opt-in and off by default; with it off, logging is exactly as before. No behaviour change beyond logging verbosity.
How it was tested
cmake --preset macos).Debug logging in action
On — the dock shows the resolved backend launch (
· [P1] debug:lines: python path, model/channel/confidence/thresholds, deck-list paths) followed by every backend line unfiltered (HF Hub notice,use_fast, weight-loading progress — normally hidden):Off (default) — only the meaningful lines, filtered: