vscode-aspire-postdebug-cleanup

Terminate orphaned .NET Aspire processes and Docker containers after debugging sessions.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/jonnymuir/Umbraco.Prism --skill vscode-aspire-postdebug-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vscode-aspire-postdebug-cleanup
Source: https://github.com/jonnymuir/Umbraco.Prism/tree/main/.claude/skills/vscode-aspire-postdebug-cleanup
Command: npx skills add https://github.com/jonnymuir/Umbraco.Prism --skill vscode-aspire-postdebug-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill resolves port conflicts and system clutter caused by .NET Aspire processes, dashboard instances, and Docker containers that fail to terminate automatically when the VS Code debugger stops.

Core Features & Use Cases

  • Automated Process Termination: Gracefully identifies and kills orphaned Aspire DCP and dashboard processes using specific PIDs.
  • Container Hygiene: Automatically stops and removes Docker containers associated with the Aspire resource labels.
  • Use Case: Use this after a long debugging session to ensure your local environment is clean and ready for the next run without manually hunting for background processes.

Quick Start

Configure the postDebugTask in your launch.json to execute the cleanup script automatically whenever your debugging session ends.

Frequently Asked Questions about vscode-aspire-postdebug-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up orphaned .NET Aspire processes and Docker containers after debugging?

To clean up orphaned .NET Aspire processes, you can configure a postDebugTask in your VS Code launch.json to automatically run a script that terminates lingering DCP and dashboard processes and stops associated Docker containers.

Why does .NET Aspire leave orphaned processes running in VS Code?

.NET Aspire processes and Docker containers can be left orphaned when the VS Code debugger stops unexpectedly, preventing graceful shutdown and causing system clutter, port conflicts, and resource exhaustion in your local development environment.

How do I automatically stop Aspire Docker containers when a VS Code debug session ends?

Automatically stop Aspire Docker containers by linking a cleanup script to the postDebugTask in your launch.json, which executes upon debug termination to stop and remove containers tagged with specific Aspire resource labels.

What's the best way to prevent port conflicts from leftover .NET Aspire background processes?

The best way to prevent port conflicts from leftover .NET Aspire processes is automating their termination via a post-debug script that targets specific PIDs and removes associated Docker containers, ensuring a clean environment for the next run.

Does the Aspire post-debug cleanup script require specific shell utilities to run?

Yes, the Aspire post-debug cleanup script requires shell execution permissions and standard Unix utilities like ps, kill, and docker to identify and terminate orphaned processes and containers effectively.

Can I run the Aspire process cleanup manually instead of triggering it through launch.json?

Yes, you can manually execute the cleanup script to terminate orphaned .NET Aspire processes and Docker containers, though configuring it as a postDebugTask in launch.json automates the process whenever a debugging session ends.