Skip to content

Add 'Restart in Debug mode' workspace action to dashboard #23863

@snecklifter

Description

@snecklifter

Problem

The controller.devfile.io/debug-start annotation is actively managed by the Che Dashboard. When a user manually patches a DevWorkspace with this annotation and clicks "Restart", the dashboard's startWorkspace() function is called with debugWorkspace = false by default, which triggers manageDebugMode() to remove the annotation.

The existing "Open in Debug mode" action only works from a stopped workspace. There is no way to restart a running workspace in debug mode from the dashboard UI.

Root Cause

The restartWorkspace action creator in store/Workspaces/devWorkspaces/actions/actionCreators/restartWorkspace.ts does not accept or forward a debugWorkspace parameter. When it internally calls startWorkspace(), it always uses the default debugWorkspace = false, causing manageDebugMode() to strip the annotation.

Proposed Solution

  1. Thread a debugWorkspace boolean parameter through restartWorkspace at all layers (low-level action creator → mid-level store action)
  2. Add a new RESTART_DEBUG_AND_OPEN_LOGS workspace action enum value
  3. Add a "Restart in Debug mode" dropdown menu item (enabled when workspace is running/starting, disabled when stopped)
  4. Handle the new action in the Provider to call restartWorkspace with { 'debug-workspace-start': true } and navigate to the Logs tab

Affected Repositories

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/need-triageAn issue that needs to be prioritized by the curator responsible for the triage. See https://github.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions