.agents/skills/issue-repro/references/platform-console.md
The default reproduction strategy. Use for any bug without platform-specific signals.
No platform-specific keywords, or explicitly: console app, command line, library-only, core SkiaSharp, SKBitmap, SKCanvas, SKPaint, SKImage, SKPath, SKMatrix, SKCodec, SKData.
Also use as fallback when a platform-specific file reports needs-platform — many
platform-reported bugs are actually in core SkiaSharp and reproducible in a console app.
{reporter_tfm} if specified)mkdir -p /tmp/skiasharp/repro/{timestamp}/{number} && cd /tmp/skiasharp/repro/{timestamp}/{number}
dotnet new console -n Repro --framework {reporter_tfm}
cd Repro
dotnet add package SkiaSharp --version {reporter_version}
# Add other packages the reporter mentioned (e.g., HarfBuzzSharp, SkiaSharp.NativeAssets.Linux)
Console.WriteLine("SUCCESS: test completed");Capture file content: Record Program.cs and .csproj in reproductionSteps[].filesCreated[].content.
dotnet build
Record: exit code, warnings, errors. Build failure may itself be the reproduction (e.g., reporter says "CS0117 error on MakeIdentity").
dotnet run
Capture:
| What | How | Limit |
|---|---|---|
| Command run | Exact command (redact absolute paths) | — |
| Exit code | 0 = success, non-zero = failure | — |
| Output | stdout/stderr | 2KB success, 4KB failure |
| Errors | Error message + first 50 lines of stack trace | 5KB |
Verification:
successfailurewrong-output, conclusion reproducedIf the first attempt doesn't clearly reproduce:
platform-docker-linux.md)| Observation | Conclusion |
|---|---|
| Crash/exception matching report | reproduced |
| Wrong output values matching report | reproduced (step result: wrong-output) |
| Code runs correctly, no errors | not-reproduced |
| Build error matching report | reproduced |
When Phase 3C requires testing against the main branch source:
# Return to the SkiaSharp repo root
cd "$(git rev-parse --show-toplevel)"
[ -d "output/native" ] && ls output/native/ | head -5 || dotnet cake --target=externals-download
# Build and run the console sample (uses project references to local source)
dotnet build samples/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj
dotnet run --project samples/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj
The console sample draws text to an SKBitmap and saves a PNG — it exercises the same
core SkiaSharp APIs. If you need to test the reporter's specific code, temporarily modify
samples/Basic/Console/SkiaSharpSample/Program.cs with the repro code, then revert with
git checkout after recording the result.