Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/project-docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ If you would like to run these specific unit test(s) multiple times, do the foll

These steps are demonstrated in this demonstrative [commit](https://github.com/dotnet/machinelearning/commit/2fb5f8cfcd2a81f27bc22ac6749f1ce2045e925b).

## Collecting crash dumps from Unix Helix tests

The Unix Helix test runner enables .NET crash dumps and JSON crash reports in `HELIX_DUMP_FOLDER`. Download the `.dmp` and `.crashreport.json` files from the failed work item's Helix artifacts. Dump-generation diagnostics are written to the console log; check these if no dump was uploaded.

The JSON report contains thread stacks and can be inspected without a matching-OS debugger. For deeper native analysis, open the dump on the matching OS with the runtime and native binaries from the Helix payload.

## Running unit tests through VSTest Task and collecting memory dumps

During development, there may also arise a need to debug hanging tests. In this scenario, it can be beneficial to collect the memory dump while a given test is hanging.
Expand Down
7 changes: 7 additions & 0 deletions eng/testing/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

EXECUTION_DIR=$(dirname "$0")

if [[ -n "$HELIX_DUMP_FOLDER" ]]; then
export DOTNET_DbgEnableMiniDump=1
export DOTNET_EnableCrashReport=1
export DOTNET_DbgMiniDumpName="$HELIX_DUMP_FOLDER/coredump.%p.%t.dmp"
export DOTNET_CreateDumpDiagnostics=1
fi




Expand Down
Loading