C# Custom Debugger - VS Code Extension
A powerful Visual Studio Code extension that enables building, running, and debugging C# code with personalized configurations. This extension integrates seamlessly with VS Code's existing functionality while allowing users to customize compilation flags, execution parameters, and debugging preferences.
Features
🔨 Build Management
- Custom Build Configurations: Configure MSBuild parameters, target frameworks, and compilation flags
- Project Cleaning: Clean build artifacts with customizable options
- Package Restoration: Restore NuGet packages with configurable sources
- Real-time Build Status: Visual feedback through status bar indicators
🚀 Run Management
- Flexible Execution: Run applications with custom arguments and environment variables
- Multiple Output Options: Choose between integrated terminal or output channel
- Working Directory Control: Set custom working directories for execution
- Process Management: Start, stop, and monitor running applications
🐛 Debug Integration
- Seamless VS Code Integration: Works with VS Code's built-in debugging capabilities
- Custom Debug Configurations: Create and manage personalized debug settings
- Attach to Process: Debug running applications by attaching to processes
- Advanced Breakpoint Support: Full support for conditional breakpoints and logging
⚙️ Configuration Management
- Project-Specific Settings: Configure settings per project or globally
- User-Friendly Interface: Easy-to-use configuration dialogs
- Settings Validation: Automatic validation of configuration parameters
- Import/Export: Share configurations across projects and teams
🎯 User Interface
- Command Palette Integration: Access all features through VS Code's command palette
- Status Bar Indicators: Real-time status updates for build, run, and debug operations
- Context Menus: Right-click integration for quick access to common operations
- Error Management: Comprehensive error handling with detailed logging
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "C# Custom Debugger"
- Click Install
From VSIX Package
- Download the latest
.vsix
file from releases
- Open VS Code
- Run command
Extensions: Install from VSIX...
- Select the downloaded
.vsix
file
Requirements
- VS Code: Version 1.74.0 or higher
- .NET SDK: .NET 6.0 or higher
- Operating System: Windows, macOS, or Linux
Quick Start
- Open a C# Project: Open a folder containing C# projects (.csproj, .sln)
- Configure Settings: Use
C# Custom: Configure Build Settings
command
- Build Project: Use
C# Custom: Build
command or Ctrl+Shift+B
- Run Application: Use
C# Custom: Run
command
- Debug Application: Use
C# Custom: Debug
command or F5
Commands
Command |
Description |
Keyboard Shortcut |
C# Custom: Build |
Build the current project |
Ctrl+Shift+B |
C# Custom: Run |
Run the current project |
Ctrl+F5 |
C# Custom: Debug |
Start debugging |
F5 |
C# Custom: Clean Project |
Clean build artifacts |
- |
C# Custom: Restore Packages |
Restore NuGet packages |
- |
C# Custom: Configure Build Settings |
Open configuration dialog |
- |
C# Custom: Stop Running Application |
Stop the running application |
- |
C# Custom: Stop Debug Session |
Stop the debug session |
Shift+F5 |
C# Custom: Show Error History |
View error history |
- |
C# Custom: Clear Error History |
Clear error history |
- |
C# Custom: Validate Environment |
Validate .NET installation |
- |
Configuration
Build Settings
{
"csharpCustom.build.configuration": "Debug",
"csharpCustom.build.platform": "Any CPU",
"csharpCustom.build.verbosity": "minimal",
"csharpCustom.build.additionalArgs": [],
"csharpCustom.build.restoreBeforeBuild": true
}
Run Settings
{
"csharpCustom.run.arguments": [],
"csharpCustom.run.workingDirectory": "",
"csharpCustom.run.environmentVariables": {},
"csharpCustom.run.useExternalTerminal": false
}
Debug Settings
{
"csharpCustom.debug.justMyCode": true,
"csharpCustom.debug.enableStepFiltering": true,
"csharpCustom.debug.suppressJITOptimizations": false,
"csharpCustom.debug.symbolOptions": {
"searchPaths": [],
"searchMicrosoftSymbolServer": true
}
}
Troubleshooting
Common Issues
Build Fails with "dotnet not found"
- Ensure .NET SDK is installed and in PATH
- Run
C# Custom: Validate Environment
to check installation
Debug Session Won't Start
- Verify project builds successfully
- Check debug configuration in launch.json
- Ensure C# extension is installed
Extension Not Activating
- Check if workspace contains C# files
- Verify VS Code version compatibility
- Check extension logs in Output panel
Getting Help
- Check Error History: Use
C# Custom: Show Error History
for detailed error information
- Validate Environment: Run
C# Custom: Validate Environment
to check setup
- View Logs: Check the "C# Custom Debugger" output channel
- Report Issues: Create an issue on GitHub with error details
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Setup
- Clone the repository
- Run
npm install
- Open in VS Code
- Press F5 to launch extension development host
Building
npm run compile
npm run package
Testing
npm test
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
See CHANGELOG.md for a detailed history of changes.
Support
Enjoy coding with C# Custom Debugger! 🚀