dotprof 1.0.0-rc.1
See the version list below for details.
dotnet tool install --global dotprof --version 1.0.0-rc.1
dotnet new tool-manifest
dotnet tool install --local dotprof --version 1.0.0-rc.1
#tool dotnet:?package=dotprof&version=1.0.0-rc.1&prerelease
nuke :add-package dotprof --version 1.0.0-rc.1
<div align="center">
dotprof
Inject trace logs for AI Coding Agents
</div>
dotprof is similar to dotnet-trace[^dnt], dotnet-stack[^dns], strace, dotTrace, dntrace, or other tracing/profiling tools.
But the existing tools are too sophisticated in AI era.
dotprof is optimized and streamlines workflow for coding agents.
[^dnt]: dotnet-trace diagnostic tool - .NET CLI - .NET | Microsoft Learn — https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-trace
[^dns]: dotnet-stack diagnostic tool - .NET CLI - .NET | Microsoft Learn — https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-stack
Sample Output
Without having to read the AI-generated code, you can easily understand the execution flow correctness, bottlenecks, etc.
Then you just paste the result, add your analysis and say "do it".
|--> Sandbox.<Main>
|--> Sandbox.Main
|--> <Main>d__0..ctor
|<-- <Main>d__0..ctor (0.2955ms, 0.00s total, alloc ~= 8,224 B)
|--> <Main>d__0.MoveNext
|--> Sandbox.NoArgs
|<-- Sandbox.NoArgs (0.0093ms, 0.01s total, alloc ~= 0 B)
|--> Sandbox.Branch_WithoutReturn
|--> Sandbox.<Branch_WithoutReturn>g__true_branch|6_0
|<-- Sandbox.<Branch_WithoutReturn>g__true_branch|6_0 (0.0009ms, 0.01s total, alloc ~= 0 B)
|<-- Sandbox.Branch_WithoutReturn (0.0625ms, 0.01s total, alloc ~= 8,224 B)
|--> Sandbox.Branch_WithoutReturn
|--> Sandbox.<Branch_WithoutReturn>g__false_branch|6_1
|<-- Sandbox.<Branch_WithoutReturn>g__false_branch|6_1 (0.0006ms, 0.01s total, alloc ~= 0 B)
|<-- Sandbox.Branch_WithoutReturn (0.0616ms, 0.01s total, alloc ~= 0 B)
|--> Sandbox.Branch_WithReturn
|--> Sandbox.<Branch_WithReturn>g__true_branch|7_0
|<-- Sandbox.<Branch_WithReturn>g__true_branch|7_0 (0.0004ms, 0.01s total, alloc ~= 0 B)
|<-- Sandbox.Branch_WithReturn (0.0415ms, 0.01s total, alloc ~= 0 B)
|--> Sandbox.Branch_WithReturn
|--> Sandbox.<Branch_WithReturn>g__false_branch|7_1
|<-- Sandbox.<Branch_WithReturn>g__false_branch|7_1 (0.0043ms, 0.01s total, alloc ~= 8,224 B)
|<-- Sandbox.Branch_WithReturn (0.0419ms, 0.01s total, alloc ~= 8,224 B)
|--> Sandbox.CI_fails_if_stdout_doesnt_include_this__2255201d_4e66_4fb0_b0c0_f1ee1c005c61
|<-- Sandbox.CI_fails_if_stdout_doesnt_include_this__2255201d_4e66_4fb0_b0c0_f1ee1c005c61 (0.0003ms, 0.01s total, alloc ~= 0 B)
|<-- <Main>d__0.MoveNext (0.5183ms, 0.01s total, alloc ~= 16,448 B)
|<-- Sandbox.Main (4.4710ms, 0.01s total, alloc ~= 24,672 B)
|<-- Sandbox.<Main> (5.3211ms, 0.01s total, alloc ~= 24,672 B)
Performance Metrics
- Milliseconds: method, property or constructor execution duration.
- Total seconds: elapsed time from app start (technically, it's from static field initialization).
- Allocation: delta value of
GC.GetTotalMemoryfrom method start (new byte[1024]takes 8,224 B).
Basic Usage
# Install as a global tool
dotnet tool install -g dotprof
# Or, use with dnx
dnx -y dotprof -- [args]
# Inject traces to current repo
dotprof
# Inject traces to only members whose full name has Foo or Bar
dotprof --targets Foo,Bar
Test Mode
Inject and view traces using dotnet test without complicated setups.
# Usage
dotprof test [options] - [args]
# Example
dotprof test -p ./Foo - --filter Name~Foo
# Automatically run the following commands
dotprof -p ./Foo
dotnet test --filter Name~Foo
CLI Mode
Build and inject traces and then run resulting .dll with dotnet <dll> [args].
# Usage: Inject options and CLI arguments are separated by '-'
dotprof [options] - [args]
# Example: Build ./src and run with 'foo --bar=baz'
dotprof -p ./src - foo --bar=baz
Unity Integration
You can inject custom logger such as UnityEngine.Debug.Log, to existing .dll files.
Logger method signature must be
void Method(object).
dotprof -p foo.dll --logger UnityEngine.Debug.Log
Troubleshooting
Traces not appear in console
Try run dotprof once again.
First-time execution may not work as expected (help wanted).
Failed to read environment variable [DOTNET_STARTUP_HOOKS], HRESULT: 0x80070002
If this error occurs even if you didn't set, run:
set DOTNET_STARTUP_HOOKS=
NOTE: It is not set in this tool. Not sure why this happens.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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 is compatible. 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.0 | 123 | 7/10/2026 |
| 1.3.0-rc.1 | 63 | 7/10/2026 |
| 1.2.0 | 107 | 7/7/2026 |
| 1.2.0-rc.1 | 62 | 7/7/2026 |
| 1.1.0 | 102 | 7/4/2026 |
| 1.0.2 | 104 | 7/2/2026 |
| 1.0.1 | 96 | 7/2/2026 |
| 1.0.0 | 105 | 7/1/2026 |
| 1.0.0-rc.4 | 60 | 6/30/2026 |
| 1.0.0-rc.3 | 56 | 6/30/2026 |
| 1.0.0-rc.2 | 58 | 6/30/2026 |
| 1.0.0-rc.1 | 62 | 6/28/2026 |