SelfAttach.Attach never causes SelfAttach.State to be Active
I'm using the sample project from https://confluence.jetbrains.com/display/NETCOM/Using+dotTrace+Perfomance+API and following it exactly (down to the file names). After completing the Self-Profiled Application code I attemped to run the generation code. However it gets stuck in an infinite loop waiting for the SelfAttach.State to be set to Active.
private void OnTimer(object sender, EventArgs e)
{
while (SelfAttach.State != SelfApiState.Active)
Thread.Sleep(250);
if ((genCounter == 1) && (PerformanceProfiler.IsActive))
{
PerformanceProfiler.Begin();
PerformanceProfiler.Start();
}
mainGrid.Update();
genCounter++;
lblGenCount.Content = "Generations: " + genCounter;
if (genCounter == 10)
{
PerformanceProfiler.Stop();
PerformanceProfiler.EndSave();
}
}
When I go to the task manager I can see what seems to be the profiler task (JetBrains ExternalLauncherProfiler) running, but my test application never recognizes it.
The reason I'm running through this sample is because I have been trying to get this to work in my own application without any success. I'm running Windows 10 if that has anything to do with it.
Please sign in to leave a comment.
Ilmenauhimmelblau,
Kayla,
I've answered you in support ticket.
Dear Konstantin,
I have exactly the same problem on a Windows 7 machine, trying to get the API running in a MVC web application via the global.asax.cs file. The SelfAttach.State remains inactive.
Any help?
Many thank in advance
Ilmenauhimmelblau
Dear Anna,
many thanks. This was the problem.
Best regards