Conversation
- Add BreakpointManager class to manage breakpoints centrally - Store breakpoints by file_system_path basename (stable identifier) - Implement add, remove, toggle, and query methods - Support enable/disable and clear all functionality - Session-only storage (cleared when RAFCON closes)
- Add BreakpointManager instance in ExecutionEngine.__init__ - Import BreakpointManager from breakpoint_manager module
…e types - Add breakpoint check in State.start() run_wrapper before self.run() - Check applies to all state types (ExecutionState, HierarchyState, LibraryState) - Pause execution when breakpoint is hit - Uses file_system_path from base State class
- Create BreakpointsView with GTK TreeView to display breakpoints - Show columns: State name, Path, Enabled checkbox - Buttons: Remove Selected, Remove All, Refresh, Toggle All - View displays data without business logic
- Create BreakpointsController to manage breakpoints panel - Populate TreeView from BreakpointManager.get_all_breakpoints() - Handle user actions: toggle enabled, remove selected, remove all - Update BreakpointManager when user makes changes - Follows MVC pattern: controller bridges view and model
- Add Breakpoints tab to right sidebar in main window - Wire up BreakpointsController in MainWindowController - Add breakpoints view container to main_window.glade - Add breakpoints view to main window view class
- Add breakpoint checkbox to state properties in overview panel - Available for all state types - Checkbox reflects current breakpoint state - Toggle adds/removes breakpoint via BreakpointManager
- Draw red dot on transitions leading to states with breakpoints - Uses Cairo graphics library for rendering - Provides visual feedback in graphical state machine view
- Move import from inside function to module level - Follows Python best practice of top-level imports
|
I tested it for a simple state machine and there it works as expected great job. For which kind of states did you test it? Does it work for:
also as a discussion point:
And another missing functionality: Suggestion: What do you guys think? |
|
Yes, it should work for library and concurrency states, I tested them during development. For configs, we could introduce a debugging mode if needed. Also, right-click support should be straightforward to add. |
|
I also agree for the right click thing, I think it is a nice idea! Generally I like the feature and the visuals are nice and intuitive, good job! I tested only very briefly here is what I found:
|
|
|
About 4.: I think this is connected to the breakpoint feature as it doesn't happen on another branch version |
25c830e to
28b9351
Compare
…d thread mismatch
|
I discovered another minor bug: |
Goal
When debugging complex state machines or preparing live demos, developers need a way to pause execution at specific states. Currently, they must use "run to selected state" which can be unreliable due to zoom/UI issues, or manually pause execution or use step through debugging for the entire execution. This is particularly problematic during demos where pre-run sequences take significant time. This feature adds traditional IDE style breakpoints that automatically pause execution when reaching marked states providing a reliable alternative.
Changes
BreakpointManagerclass for breakpoint tracking and managementState.start()that pauses execution when breakpoint is hitHow It Works
When a user sets a breakpoint on a state:
UI Components
Breakpoints Panel
State Overview Panel
Visual Indicators