Skip to content

add stepping functionality (Continue, Step Over, Step In, Step Out) and breakpoint management (Toggle individual, Clear all), providing a full-featured debugging experience for NWScript execution.#65

Open
th3w1zard1 wants to merge 1 commit intoKobaltBlu:masterfrom
th3w1zard1:pr/acc97d65

Conversation

@th3w1zard1
Copy link
Contributor

@th3w1zard1 th3w1zard1 commented Feb 8, 2026

Implemented Debugger TODO Features

1. Step In Functionality

  • Implementation: Added btnStepIn() function that sends IPCMessageType.Debug with subType IPCMessageTypeDebug.ScriptStepIntoInstruction
  • Button: Added Step Into Instruction button with appropriate FontAwesome icon (down arrow)

2. Step Out Functionality

  • Implementation: Added btnStepOut() function that sends IPCMessageType.Debug with subType IPCMessageTypeDebug.ScriptStepOutInstruction
  • Button: Added Step Out of Instruction button with appropriate FontAwesome icon (up arrow)

3. Clear Breakpoints Functionality

  • Implementation: Added comprehensive btnClearBreakpoints() function that:
    • Iterates through all current breakpoints in instance.breakPoints
    • Sends IPCMessageType.RemoveScriptBreakpoint messages for each breakpoint with proper parameters (instance UUID + address)
    • Clears the breakpoints from the instance Map
    • Updates local state to trigger UI re-render
  • Button: Existing Clear Breakpoints button now fully functional

4. UI Enhancements

  • Imports: Added IPCMessageTypeDebug import for debug sub-types
  • Button Layout: Integrated Step In and Step Out buttons into the main debugger controls between Step Over and Clear Breakpoints
  • Icons: Proper FontAwesome SVG icons for all debugging buttons

Technical Details

IPC Message Patterns

  • Step In/Out: Uses IPCMessageType.Debug with debug sub-types (following existing pattern)
  • Clear Breakpoints: Uses IPCMessageType.RemoveScriptBreakpoint with parameters (instance UUID, address)

State Management

  • Properly updates both instance state and local React state for breakpoints
  • Maintains consistency between debugger backend and UI

Error Handling

  • All functions check for valid instance before proceeding
  • Graceful handling of empty breakpoint collections

Code Quality

  • No linter errors
  • Follows existing code patterns and conventions
  • Comprehensive implementation with proper error handling
  • Maintains backward compatibility

The debugger now has complete stepping functionality (Continue, Step Over, Step In, Step Out) and breakpoint management (Toggle individual, Clear all), providing a full-featured debugging experience for NWScript execution.

…nd breakpoint management (Toggle individual, Clear all), providing a full-featured debugging experience for NWScript execution.

(cherry picked from commit acc97d6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant