Questions tagged [diagnostics]
503 questions
6
votes
8 answers
Why does the second for loop always execute faster than the first one?
I was trying to figure out if a for loop was faster than a foreach loop and was using the System.Diagnostics classes to time the task. While running the test I noticed that which ever loop I put first always executes slower then the last one. Can…

Bob Dylan
- 4,393
- 9
- 40
- 58
5
votes
2 answers
How can I set the rollover strategy in System.Diagnostics trace log
I have a project, that using System.Diagnostics for logging,
And it creating lots of new logs files, each one starting with GUID,
Even when the last log file was very small
I want to setup a role that controls the creation of new log file
Where can…

Delashmate
- 2,344
- 5
- 26
- 40
5
votes
6 answers
What should I display in my About box?
I've built a small .NET winforms utility for internal use at my company, and as the primary interface is a tab control, I've decided to add a tab for the "about box" instead of a separate form. So, I have some space to fill in my about box.
Thus far…

Ben Brandt
- 2,851
- 5
- 34
- 45
5
votes
1 answer
How do I get log files from an deployed iOS app that is not crashed?
I know that it is possible to get crash reports from an appstore customer, either using xcode -> organizer -> crash, or telling the customer to go to settings -> privacy -> diagnostics.
However, the app did not crash (just hangs) and there is no…

Stiefel
- 2,677
- 3
- 31
- 42
5
votes
0 answers
Unable to use diagnostic tools while remote debugging
I'm facing an issue where I'm unable to use the diagnostic tool(s) during remote debugging. If I start my program on my local machine, everything is fine.
After making sure that my domain user has debug permission on the target machine (configured…

Steffen Winkler
- 2,805
- 2
- 35
- 58
5
votes
2 answers
Roslyn C# incrementing change
Trying with a Diagnostic and a CodeFix to make a code who transform that:
variable = variable + 1;
otherVariable = otherVariable -1;
Into:
variable++;
otherVariable--;
Already done the diagnostic (it works):
var incrementing = node as…

Maloz
- 165
- 1
- 2
- 17
5
votes
3 answers
How do I replace a string variable with a var in Roslyn?
For local declarations like:
string a = string.Empty;
How can I write a diagnostic to change it to:
var a = string.Empty;

user3500462
- 125
- 7
5
votes
7 answers
Diagnosing application hang in a production .NET desktop program
I have trouble. One of the users of an application I'm developing is occasionally, but regularly, experiencing an application hang.
When this happens, we find an entry with a source of "Application Hang" in the machine's Event Log, with the…

Robert Rossney
- 94,622
- 24
- 146
- 218
5
votes
1 answer
How do I run diagnostic plots for lmer in R?
I am trying to run diagnostic plots on an lmer model but keep hitting a wall. I'm not sure how much information I need to provide here, but here goes:
The model is simple:
best <- lmer(MSV_mm ~ Size_treat + (1|Rep) + (1|Patch) + (1|Trap), data=…

Kika Tarsi
- 47
- 1
- 1
- 2
5
votes
1 answer
Proper way to organize diagnostic tests in Java EE
I am working on a Spring-based web-application that uses several components, including PostgreSQL, raw filesystem and more..
I want to make a small admin-page, where an admin will be able to test, if all components are working propery, e.g.:
if…

Luce Ian
- 237
- 1
- 3
- 9
5
votes
3 answers
What does this Azure deployment error mean?
I'm getting the following error when I try to deploy to my Azure Cloud Service through Visual Studio 2012:
Windows Azure could not find the resource Diagnostics in the service package. To
upgrade the deployment, you must add the resource.…

Scottie
- 11,050
- 19
- 68
- 109
5
votes
2 answers
ASP.NET MVC 4 Web Api: Diagnostic features
I'm searching for a feature to enable loggin/tracing in ASP.NET MVC 4 Web Api.
In WCF you can activate logging and WCF writes that it is doing. Then, I can open the dump and search for errors.
I do not want to trace my web api but log that the…

user437899
- 8,879
- 13
- 51
- 71
5
votes
2 answers
More precise diagnostic error messages with templates?
Compilation errors with templates are often obscure and not easily decipherable unless one is really well versed with templates. Many times an expert programmer might as well be flummoxed by these. I am sure most of us have felt the pinch of it many…

Alok Save
- 202,538
- 53
- 430
- 533
4
votes
1 answer
How to quickly get the managed stack trace of threads using lots of CPU
When diagnosing a high CPU issue, the first question that comes to mind is which thread(s) is using all the CPU and what is it doing (in Managed Code terms)? To figure this out one needs to install Process Explorer for example to find the offending…

Mark
- 5,223
- 11
- 51
- 81
4
votes
4 answers
Method to dump classes on the classpath from inside JVM?
My code is failing with a ClassNotFoundException.
I can see that the jar file containing the class is definitely on the classpath from the command prompt execution.
Is there a way to dump the list of classes on the classpath from the JVM? (Ideally…

hawkeye
- 34,745
- 30
- 150
- 304