SharpInspect.Core
1.0.3
See the version list below for details.
dotnet add package SharpInspect.Core --version 1.0.3
NuGet\Install-Package SharpInspect.Core -Version 1.0.3
<PackageReference Include="SharpInspect.Core" Version="1.0.3" />
<PackageVersion Include="SharpInspect.Core" Version="1.0.3" />
<PackageReference Include="SharpInspect.Core" />
paket add SharpInspect.Core --version 1.0.3
#r "nuget: SharpInspect.Core, 1.0.3"
#:package SharpInspect.Core@1.0.3
#addin nuget:?package=SharpInspect.Core&version=1.0.3
#tool nuget:?package=SharpInspect.Core&version=1.0.3
SharpInspect
Chrome DevTools-style inspector for any .NET application
Monitor HTTP requests, console logs, performance metrics, and application info in real-time.
English | 한국어
Features
- Framework Agnostic: Works with WinForms, WPF, Console, ASP.NET Core, and more
- One-Line Setup: Start with
SharpInspectDevTools.Initialize() - Real-Time Monitoring: WebSocket-powered live data streaming
- Chrome DevTools UI: Familiar, intuitive interface
- Zero Dependencies: No external NuGet packages required
- Development-Only by Default: Automatically disabled in production environments
Supported Platforms
| Platform | Version |
|---|---|
| .NET Framework | 3.5+, 4.6.2+ |
| .NET | 6.0, 8.0, 9.0 |
| .NET Standard | 2.0 |
Quick Start
1. Install
dotnet add package SharpInspect
2. Initialize
using SharpInspect;
// Initialize at app startup
SharpInspectDevTools.Initialize();
// Or with options
SharpInspectDevTools.Initialize(options =>
{
options.Port = 9229;
options.AutoOpenBrowser = true;
});
3. Open in Browser
http://localhost:9229
Usage Examples
Console App
using SharpInspect;
class Program
{
static async Task Main()
{
SharpInspectDevTools.Initialize();
// Create HttpClient with automatic capture
using var client = SharpInspectDevTools.CreateHttpClient();
// HTTP requests appear in DevTools Network tab
var response = await client.GetStringAsync("https://api.example.com/data");
// Console output appears in DevTools Console tab
Console.WriteLine("Data received!");
SharpInspectDevTools.Shutdown();
}
}
WinForms / WPF
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
SharpInspectDevTools.Initialize();
base.OnStartup(e);
}
protected override void OnExit(ExitEventArgs e)
{
SharpInspectDevTools.Shutdown();
base.OnExit(e);
}
}
Using Statement (Auto-Shutdown)
using (new SharpInspectSession())
{
// Your app logic
// Automatically shuts down when block exits
}
Configuration
SharpInspectDevTools.Initialize(options =>
{
// Server
options.Port = 9229;
options.Host = "localhost";
options.AutoOpenBrowser = true;
options.OpenInAppMode = true; // Opens as standalone window (Chrome/Edge)
// Capture toggles
options.EnableNetworkCapture = true;
options.EnableConsoleCapture = true;
options.EnablePerformanceCapture = true;
options.EnableApplicationCapture = true;
// Storage limits (ring buffer)
options.MaxNetworkEntries = 1000;
options.MaxConsoleEntries = 5000;
options.MaxPerformanceEntries = 2000;
options.MaxBodySizeBytes = 1048576; // 1MB
// Development-only mode (enabled by default)
options.EnableInDevelopmentOnly = true;
options.DevelopmentDetectionMode = DevelopmentDetectionMode.Auto;
// Security
options.MaskedHeaders.Add("X-API-Key");
options.AccessToken = "my-secret-token";
});
Development Detection Modes
SharpInspect runs only in development environments by default:
// Auto (default): Environment variable first, then debugger attached
options.DevelopmentDetectionMode = DevelopmentDetectionMode.Auto;
// Environment variable only: DOTNET_ENVIRONMENT or ASPNETCORE_ENVIRONMENT = "Development"
options.DevelopmentDetectionMode = DevelopmentDetectionMode.EnvironmentVariableOnly;
// Debugger only: Debugger.IsAttached
options.DevelopmentDetectionMode = DevelopmentDetectionMode.DebuggerOnly;
// Custom: Your own logic
options.DevelopmentDetectionMode = DevelopmentDetectionMode.Custom;
options.CustomDevelopmentCheck = () => MyConfig.IsDevMode;
// Force enable in all environments
options.EnableInDevelopmentOnly = false;
DevTools UI Features
Network Tab
- Request/response list with timing info
- Full path display (pathname + querystring)
- Status code color coding (2xx green, 4xx orange, 5xx red)
- Headers and body inspection (JSON formatted)
- Timing breakdown (DNS, TCP, TLS, TTFB)
- Filtering and search
- Clear button
- Export HAR: Export network logs as HAR (HTTP Archive) format
- Copy as cURL/fetch: Copy request as cURL command or fetch code
Console Tab
- Log level color coding
- Real-time streaming
- Stack trace display for exceptions
- Filtering and search
Performance Tab
- CPU usage monitoring
- Memory metrics (working set, GC heap)
- GC collection counts
- Thread count tracking
- Request Stats: Requests/sec, avg response time, error rate, uptime
Application Tab
- App info (name, version, runtime, PID)
- Environment variables
- Loaded assemblies list
REST API
| Endpoint | Method | Description |
|---|---|---|
/api/status |
GET | Server status |
/api/network |
GET | Network entries (paginated) |
/api/network/{id} |
GET | Single network entry |
/api/network/clear |
POST | Clear network logs |
/api/network/export/har |
GET | Export network logs as HAR |
/api/console |
GET | Console entries (paginated) |
/api/console/clear |
POST | Clear console logs |
/api/performance |
GET | Performance entries (paginated) |
/api/performance/clear |
POST | Clear performance logs |
/api/application |
GET | Application info |
/api/application/refresh |
POST | Refresh application info |
/ws |
WebSocket | Real-time event stream |
Project Structure
SharpInspect/
├── src/
│ ├── SharpInspect.Core/ # Core models, storage, events, interceptors
│ ├── SharpInspect.Server/ # Embedded web server (REST API, WebSocket)
│ │ └── wwwroot/ # Frontend files (HTML, CSS, JS)
│ └── SharpInspect/ # Public API, DI extensions
└── samples/
├── Sample.ConsoleApp/ # .NET 8 console example
└── Sample.WinForms/ # .NET Framework 4.6.2 WinForms example
Build
# Build all
dotnet build SharpInspect.sln
# Run sample
dotnet run --project samples/Sample.ConsoleApp
Security Considerations
- Binds to
localhostonly by default - Auto-disabled in production (EnableInDevelopmentOnly = true)
- Sensitive headers masked automatically (Authorization, Cookie)
- Optional token-based authentication
Roadmap
Completed
- Network Tab (HTTP capture with timing)
- Console Tab (log capture)
- Performance Tab (CPU, memory, GC metrics)
- Application Tab (app info, env vars, assemblies)
- Real-time WebSocket streaming
- Chrome DevTools-style UI
- Development-only mode with multiple detection strategies
- Multi-framework support (.NET Framework 3.5 ~ .NET 9.0)
- Dark mode UI
- HAR export
- Request Stats (requests/sec, avg response time, error rate)
- Frontend modularization (separate HTML/CSS/JS files)
- Network panel UX improvements (full path display, error status)
- NuGet package release
Planned
- Custom panel plugin system
- Request replay
- Performance timeline view
Contributing
Issues and PRs welcome!
License
MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net35 is compatible. net40 was computed. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 2.1.0)
-
net6.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
-
net9.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SharpInspect.Core:
| Package | Downloads |
|---|---|
|
SharpInspect.Server
Embedded web server for SharpInspect - REST API, WebSocket, and static file serving. |
|
|
SharpInspect
Chrome DevTools-like inspector for any .NET application. Press F12 to inspect HTTP traffic, logs, and performance in real-time. |
GitHub repositories
This package is not used by any popular GitHub repositories.