microsoft / microsoft/CLRInstrumentationEngine

Provide better error messages for InstrumentationMethod initialization failure

Open
#526 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
102
Forks
52
Avg merge
13h 11m
Merged PRs (30d)
6

Description

Benign errors such as CInstrumentationMethod::Initialize - failed to initialize instrumentation method PID: ### hr: 80131375 name: Production Breakpoint Instrumentation Method appear which represents CORPROF_E_PROFILER_CANCEL_ACTIVATION and is thrown from https://github.com/microsoft/CLRInstrumentationEngine/blob/2cfa780eb5d71f0b7e2b0ff6d055750020e2d26e/src/InstrumentationEngine.Lib/InstrumentationMethod.cpp#L39

It would be helpful to provide more useful messages for these error codes so users realize they're a symptom of an issue and not part of the root-cause.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/InstrumentationEngine.Lib/InstrumentationMethod.cpp at the initialization failure reported around line 39, and inspect how HRESULT values are currently surfaced. Identify the relevant benign error codes, including CORPROF_E_PROFILER_CANCEL_ACTIVATION, and provide messages that distinguish these symptoms from the root cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.