Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6206193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:24:32+00:00 2026-05-24T05:24:32+00:00

I have an enum, and I am trying to figure out what code is

  • 0

I have an enum, and I am trying to figure out what code is actually creating an instance of it. I have a whole lot of code, and I am fairly certain the code that I am looking for is in one of the many obscure projects that is not in my current solution, so find usages won’t work.

I know there is no such thing as a constructor on an enum, but I would really like a way to break execution and examine the call stack anytime any code creates and uses this enum. I have tried putting breakpoints on individual enum values, but they never toggle, even when I know they are being used.

Is this possible, or am I going to need to take a different route to find what I am looking for.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:24:32+00:00Added an answer on May 24, 2026 at 5:24 am

    Well, it is technically possible, assuming you control the code of the enum itself:

    1. Rename YourEnum to YourEnumInternal
    2. Create class YourEnum and put a Property for each value in YourEnumInternal, with the same name, and return the respective member of YourEnumInternal.
    3. Put breakpoints in every property.

    Also, if what you really want to do is look at the callstacks when members of this enum are added to a particular collection (as you said in a comment), why not find usages on the collection (which hopefuly has a smaller scope?) and put breakpoints (or better yet, TracePoints with the $CALLSTACK psuedovariable) wherever items are added to it?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out some C code so that I can port it
For a long time i have been trying to figure out what is the
I have an enum that looks as follows: public enum TransactionStatus { Open =
So I thought that an enum would help me with States. Basically, I have
I'm trying to make a function that can take an enum type, display all
I am trying to figure out the best way to go about my design
I have code that gives a list of all possible values for any given
I have the follwoing enum in my backend java code: public static enum CountryCodes
I am trying to bound a list with a enum . Enum have following
I'm trying to serialize an ENUM singleton instance (as described by Joshua Bloch in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.