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
- Thread a
debugWorkspace boolean parameter through restartWorkspace at all layers (low-level action creator → mid-level store action)
- Add a new
RESTART_DEBUG_AND_OPEN_LOGS workspace action enum value
- Add a "Restart in Debug mode" dropdown menu item (enabled when workspace is running/starting, disabled when stopped)
- Handle the new action in the Provider to call
restartWorkspace with { 'debug-workspace-start': true } and navigate to the Logs tab
Affected Repositories
Problem
The
controller.devfile.io/debug-startannotation is actively managed by the Che Dashboard. When a user manually patches a DevWorkspace with this annotation and clicks "Restart", the dashboard'sstartWorkspace()function is called withdebugWorkspace = falseby default, which triggersmanageDebugMode()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
restartWorkspaceaction creator instore/Workspaces/devWorkspaces/actions/actionCreators/restartWorkspace.tsdoes not accept or forward adebugWorkspaceparameter. When it internally callsstartWorkspace(), it always uses the defaultdebugWorkspace = false, causingmanageDebugMode()to strip the annotation.Proposed Solution
debugWorkspaceboolean parameter throughrestartWorkspaceat all layers (low-level action creator → mid-level store action)RESTART_DEBUG_AND_OPEN_LOGSworkspace action enum valuerestartWorkspacewith{ 'debug-workspace-start': true }and navigate to the Logs tabAffected Repositories
controller.devfile.io/debug-startannotation is already fully implemented in devfile/devworkspace-operator (pkg/constants/metadata.go,controllers/workspace/devworkspace_controller.go)