Skip to content

Harden local debug runner cleanup for stale processes and locked logs #230

@Cataldir

Description

@Cataldir

Context

VS Code debug startup can fail when a previous local Tutor process keeps .tmp/local-dev/logs/*.out.log or *.err.log open. The observed failure was Remove-Item on �vatar.out.log because the file was being used by another process.

Scope

  • .vscode/scripts/local-dev.ps1
  • Local development/debug workflow only.

Acceptance criteria

  • start and restart clean safe stale Tutor processes before reusing logs.
  • Cleanup is constrained to local Tutor dev ports and workspace command lines.
  • Locked log files no longer fail startup; the runner removes or rotates logs safely.
  • pids.json stays flat and status/stop tolerate stale or invalid records.
  • Chat debug lifecycle validates: start, health, debug port listen, flat PID state, stop, ports clear.

Implementation status

Implemented in the current workspace and validated locally.

Validation

  • PowerShell parse: PASS.
  • VS Code JSON diagnostics: PASS.
  • Chat debug lifecycle: PASS.
  • Final Tutor local ports: clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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