I have a manager which is called by several different classes. The manager is instantiate through a Inject. So when I’m debugging I need to know who instantiate this manager? is there any way to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Not unless the caller passes itself to the method which creates the manager and is then passed to the constructor of the manager which then stores it in a private variable. When you don’t track this information explicitely, it will be lost.
Alternatively, you could also set a debugging breakpoint in the constructor of the manager and when the breakpoint is hit examine the call stack to find out from where it is called.