These are more questions about using the Profiler API, rather than a bug report.
I don't know where one can contact the dotnet developers directly, also I didn't find information about this in the documentation and on the internet, so the best way I've found is here.
Could you please clarify these two things, which are important to me (and I suspect also to many others):
-
How can we debug a DLL that contains a profiler class (that implements the ICorProfilerCallback) and a class factory (that implements the IClassFactory) in Visual Studio, so as not to attach the debugger to an already running process, but to gain control immediately when loading the DLL?
I'd like to have control at the very beginning of the execution of the DllGetClassObject callback inside the DLL. It will already be executed if we simply attach to the process.
Could you help find a way to do this please?
-
Does process profiling run if the process is under debug in Visual Studio?
I did the following test: placed the MessageBox call at the very beginning of DllGetClassObject.
If I start a dotnet process, I see the message box shown.
But if I start debugging the same process under the Visual Studio debugger, message box is not shown.
It seems that the DllGetClassObject function is not called when debugging.
But I can't check this because I can't find the answer to question 1.
Could you help and clarify this please?
These are more questions about using the Profiler API, rather than a bug report.
I don't know where one can contact the dotnet developers directly, also I didn't find information about this in the documentation and on the internet, so the best way I've found is here.
Could you please clarify these two things, which are important to me (and I suspect also to many others):
How can we debug a DLL that contains a profiler class (that implements the ICorProfilerCallback) and a class factory (that implements the IClassFactory) in Visual Studio, so as not to attach the debugger to an already running process, but to gain control immediately when loading the DLL?
I'd like to have control at the very beginning of the execution of the
DllGetClassObjectcallback inside the DLL. It will already be executed if we simply attach to the process.Could you help find a way to do this please?
Does process profiling run if the process is under debug in Visual Studio?
I did the following test: placed the MessageBox call at the very beginning of
DllGetClassObject.If I start a dotnet process, I see the message box shown.
But if I start debugging the same process under the Visual Studio debugger, message box is not shown.
It seems that the
DllGetClassObjectfunction is not called when debugging.But I can't check this because I can't find the answer to question 1.
Could you help and clarify this please?