Azure-Samples / Azure-Samples/tutor

Harden local debug runner cleanup for stale processes and locked logs

Open
#230 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
8
PR merge metrics
No merged PRs in 30d

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.