Skip to content

Deployment: automate debugging log #615

@3C-SCSU

Description

@3C-SCSU

🚀 Fix GUI AI BCI broken communication

🎯 Summary

During the initial drone + BCI deployment test, a critical bug was found in GUI5.py related to an uninitialized variable. This issue has been fixed by initializing current_data_mode in the BrainwavesBackend's init function.

This ticket serves to formally merge that fix and introduce a major Quality of Life (QoL) enhancement: a comprehensive launch.json configuration for Code Debugging.


🐞 Bug Details: `current_data_mode` Read Error

Description

When the system attempted to read the state of the `current_data_mode` variable in GUI5.py, the program failed because the variable did not exist yet (it was not initialized).

Resolution Implemented

The fix ensures that the system is stable from the start:

  • ✅ We explicitly initialize the `current_data_mode` variable within the __init__ function of the BrainwavesBackend class.

Files Affected

  • [Path to BrainwavesBackend class file, e.g., brainwaves_backend.py]
  • GUI5.py (Error origin)

🛠️ Enhancement: Code Debugging Setup

Goal

To dramatically improve developer workflow and diagnosis speed by enabling immediate, line-by-line debugging of any Python file in the repository using Visual Studio Code.

Implementation

  • ⚙️ A .vscode/launch.json configuration file has been added to the repository.
  • This setup allows developers to hit F5 in Code and start the debugger directly on any selected Python file.

Testing/Verification Steps

  1. Clone the updated branch/PR.
  2. Open the project in Code.
  3. Set a breakpoint in a Python file (e.g., GUI5.py or a backend script).
  4. Switch to the Run and Debug panel (Ctrl+Shift+D).
  5. Select the new configuration (e.g., "Python: Current File (Debug)").
  6. The debugger should successfully launch and pause at the breakpoint.

Labels

bug, qol, fix, enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    JSONQOLQOL: Improvements to the QA process, tools, and environment that make the testers' jobs easier.Software Quality AssuranceTestautomationbugSomething isn't workingenhancementNew feature or requestpython

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions