Troubleshooting Common Issues in Affinic Debugger GUI: Quick Fixes and Best Practices
1. Affinic won’t start or crashes on launch
- Quick fix: Restart your machine, then launch Affinic as administrator (Windows) or with sudo (Linux) once.
- Check logs: Open the application log at the install directory (logs/) or user config (~/.affinic/logs/) and look for error lines with timestamps.
- Best practice: Keep Affinic and OS graphics/drivers up to date; disable GPU acceleration in Affinic preferences if crashes persist.
2. Target device not connecting or not recognized
- Quick fix: Verify physical connections (cables, adapters) and power-cycle the target. Try a different USB port or cable.
- Check settings: Confirm correct target selection in Affinic’s Connection pane and matching baud rate/JTAG/SWD settings.
- Best practice: Use a known-good cable and document a connection checklist (power, ground, interface pinout, interface firmware versions).
3. Breakpoints not hit
- Quick fix: Ensure you compiled with debug symbols (e.g., -g) and disabled optimizations that move/remove code (avoid -O2/O3 for debugging). Rebuild and reload firmware.
- Check runtime: Confirm the executed binary matches the loaded symbols (Affinic shows loaded module timestamps/checksums).
- Best practice: Use hardware breakpoints for flash/ROM code and confirm breakpoint limits on the target (some MCUs have few hardware breakpoints).
4. Stepping behaves unpredictably (skips lines or loops)
- Quick fix: Disable compiler optimizations and recompile; enable “disassemble on step” to see actual executed instructions.
- Check inline/optimized code: Look for inlined functions or tail-call optimizations that change flow.
- Best practice: Use source-level and instruction-level views together during complex debugging; annotate code with volatile or compiler barriers if needed for observability.
5. Variable values show as “optimized out” or incorrect
- Quick fix: Build with full debug info and no optimization. Inspect registers and memory if source variables are optimized away.
- Check symbol info: Confirm Affinic loaded the correct symbol file and the variable’s scope/lifetime.
- Best practice: Add temporary logging or volatile copies of critical variables when working with aggressive optimizations.
6. Slow UI or lag when debugging large projects
- Quick fix: Close unnecessary views/panels, disable live variable updates, or pause automatic source re-indexing.
- Check resource use: Monitor CPU/memory of Affinic and background indexer threads. Increase IDE heap or allocate more memory in startup options if supported.
- Best practice: Split very large projects into smaller modules and use separate debug configurations to limit files Affinic indexes at once.
7. GDB/Backend disconnects unexpectedly
- Quick fix: Restart the debug adapter and reconnect; check for network timeouts if remote debugging.
- Check adapter logs: Enable verbose backend logging in Affinic’s debug settings to capture adapter/transport errors.
- Best practice: Use stable versions of GDB/adapter firmware and pin debug tool versions in team environments.
8. Source code and disassembly out of sync
- Quick fix: Ensure the binary loaded matches the source tree (clean build, confirm timestamps/checksums). Reload symbols and refresh the workspace.
- Check path mapping: Verify source path mappings if the build machine paths differ from the debug machine.
- Best practice: Use reproducible build artifacts and include build-id or debug information that affinic can match to source.
9. License or activation errors
- Quick fix: Check system clock accuracy and reconnect to the license server or reapply license key. Restart Affinic.
- Check firewall: Ensure outbound connections to the license server are allowed or use offline activation workflow if provided.
- Best practice: Keep license files in a documented location and automate license renewal alerts.
10. Unexpected behavior after update
- Quick fix: Roll back to the previous stable Affinic version or reset user settings (export settings first).
- Check release notes: Scan the update changelog for breaking changes or required configuration migrations.
- Best practice: Stagger updates across team members, test updates in a staging environment before full rollout.
General troubleshooting workflow (quick checklist)
- Reproduce: Make a minimal reproducible case.
- Logs: Collect Affinic logs, backend adapter logs, and target console output.
- Isolate: Swap cables/adapters, try another host machine, or use a known-good target.
- Validate build: Confirm debug symbols, matching binaries, and compiler flags.
- Update/Rollback: Try the latest Affinic and adapter firmware or revert if the issue started after an update.
- Report: When filing a bug, include steps-to-reproduce, logs, Affinic version, OS, target MCU, debugger adapter, and a minimal repro project.
If you want, I can draft a printable one-page checklist or a template bug report for Affinic issues.
Leave a Reply