SharpInspect.Server
1.1.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
dotnet add package SharpInspect.Server --version 1.1.0
NuGet\Install-Package SharpInspect.Server -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpInspect.Server" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpInspect.Server" Version="1.1.0" />
<PackageReference Include="SharpInspect.Server" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpInspect.Server --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SharpInspect.Server, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpInspect.Server@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpInspect.Server&version=1.1.0
#tool nuget:?package=SharpInspect.Server&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | 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 4.6.2 ~ .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 | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- SharpInspect.Core (>= 1.1.0)
-
.NETStandard 2.0
- SharpInspect.Core (>= 1.1.0)
-
net6.0
- SharpInspect.Core (>= 1.1.0)
-
net8.0
- SharpInspect.Core (>= 1.1.0)
-
net9.0
- SharpInspect.Core (>= 1.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SharpInspect.Server:
| Package | Downloads |
|---|---|
|
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.