Tagged Questions
2
votes
2answers
43 views
Switch between Release and Debug in code
I published my application and I want to add extra "Admin" functionality to it.
I see a lot of debug information, when I run my application in Debug mode, all of this is removed in the Release mode, ...
7
votes
1answer
91 views
Detect if Debugger is Attached *and* stepping through
I am aware of the Debugger class within the System.Diagnostics namespace which has the IsAttached property.
Is there a property, somewhere, that can augment this call and tell me if we're actually ...
4
votes
1answer
54 views
Setting multiple breakpoint in Visual Studio 2012 [duplicate]
I would like to set breakpoint all Convert.ToInt32 lines.
I have tried to replace all Convert.ToInt32 to System.Diagnostics.Debugger.Break(); Convert.ToInt32 but it did not work because some of the ...
1
vote
1answer
102 views
Code Not hitting breakpoint in visual studio 2012 [closed]
I have a mvc c# web application i am building in vs 2012, I put a breakpoint on the controller but that breakpoint is never hit, i get the results so i know that code is running. whats weird is that ...
6
votes
1answer
56 views
Running a program gives me different results from debugging mode
I've provided a simple code which will output 10 random digits that are in between 0 and 100. When I run this in visual studio (C#) using F5, I get the same number 10 times. However, if I run it ...
1
vote
1answer
28 views
Database Reconnect After Failure
A program that I am currently working on collects and exports data to a SQL database. If there is a failure in the database, I have coded so that it will write the data to a CSV file. It is going to ...
0
votes
2answers
17 views
Debug FeatureActivated() in SharePoint WebForms
Is this possible?
I am doing:
Deploy -> Set Breakpoint in the public override void FeatureActivated -> Attach the process to the debugger -> refresh.
Obviously this won't work because ...
1
vote
3answers
46 views
Stop visual studio from breaking on exception in Tasks
i have the following code:
Task load = Task.Factory.StartNew(() => {//Some Stuff Which Throws an Exception});
try
{
load.Wait();
}
catch (AggregateException ex)
{
...
2
votes
1answer
36 views
Is it possible to actually debug 3rd party code using the source decompiled with dotPeek?
I use VS2012.
I know how to debug the 3rd party code using the .NET Reflector and always used it.
I was wondering whether this is possible with dotPeek from JetBrains or with R# itself without the ...
2
votes
2answers
41 views
Unable to debug Windows Service
I was looking into several posts in order to find how to debug a Windows Service.
I've found that if I put the following code in my OnStart() function:
Debugger.Launch();
would do the trick, but ...
0
votes
0answers
13 views
Program Error: Debugging on a remote computer having NO VS installed using temviewer
I have a clickone deployment on one of my friends system. The application works just fine on my system, however it has some issues running on his system.
I was going through the application installed ...
0
votes
2answers
65 views
Code will not run past exception VS2012
I have a try catch statement and when the code goes to throw the exception, it will not run past this point.
I press F5/F10 and the code keeps running the same line of code.
Is this to do with a ...
0
votes
2answers
32 views
.net ReportViewer - Object reference not set to an instance of an object? ReportError
Where can I catch the error that is displayed in the report viewer, since this isn't code generated by me?
Particularly, I want to find out which Object is not set to an instance.
2
votes
2answers
59 views
Is it possible to inspect the return value of a function that is not saved?
This is a slight variation of this question. If I have a function that performs an action that returns a value but I did not capture that value in a variable, is there any way I can get that value ...
0
votes
3answers
27 views
Find the result of a function being fed in to a return [duplicate]
If stepping through using a debugger and I have a block of code like the following
return int Foo()
{
return Bar();
}
Is there any way in the debugger to find out the result of Bar before Foo ...
2
votes
0answers
35 views
Are minidump files useful for analysing .NET WinForms app crashes?
Are minidump files useful for analysing .NET WinForms app crashes? I notice that NBug has the option of producting them, but if I was to receive one, I'm not sure how it could help over looking at the ...
0
votes
1answer
29 views
Debugger to step out from not responding function
I have code in C# that reads from a socket.
For some reason the other side doesn't respond.
I'm stuck with the debugger on NetworkStream.Read method.
If I break the debugger I'm still stuck there.
I ...
0
votes
4answers
48 views
System.IndexOutOfRangeException in a CSV Reformatting Program
I'm working on a program that reformats CSV files using C#. It imports a CSV and uses certain columns to be represented in a new CSV file. I'm getting a System.IndexOutOfRangeException exception using ...
1
vote
1answer
57 views
How to debug dynamic workflows (with custom activities)
I'm trying to debug a dynamic loaded workflow. For that basically I've implemented following steps:
var currentWorkflow = ActivityXamlServices.Load(@"d:\test.xaml");
var wfApp = new ...
6
votes
1answer
64 views
How can I get current values of locals and parameters on the stack?
In a .NET application I have some points where I need to collect some debug info about the current thread state. I can obtain some information new StackTrace() constructor. In particular, I can get ...
2
votes
2answers
62 views
NullReferenceException when creating a thread
I was looking at this thread on creating a simple thread pool. There, I came across @MilanGardian's response for .NET 3.5 which was elegant and served my purpose:
using System;
using ...
0
votes
2answers
29 views
log4net with a filter turned off not outputting
I am sure I have used this very filter before, but... I have the level up to debug, the filter off (ie, accept on match = true), and a _log.Debug("whatever") in the filter namespace that is not ...
0
votes
1answer
24 views
C# HPC Scheduler, Job not completes
I am trying to test a simply designed code piece on Microsoft HPC. It looks like the job is not completing the all code. My test method might be wrong though. I am just printing out some check points. ...
1
vote
1answer
31 views
Debugger shows invalid instruction
Sometimes it happens, that Visual Studio debugger shows invalid current instruction. The simplest possible reasons are:
Outdated .pdb files. These files contain information about which offset of the ...
0
votes
1answer
80 views
Step into c++/CLI wrapper dll and c# dll during debug while making plugins on firebreath
Building a firebreathplugin where there's a native dll, c# class library dll and a c++/CLI (class library) wrapper dll. No application here. Saw other posts on stack overflow. Did the Debugging Mixed ...
0
votes
1answer
27 views
How to debug my activity for TFS?
I want to automate building patches with WIX. Cause it seems to be no tools for it I write my own. But I don't know how to debug it. I can find only rubbish tutorials like this that are useless 'cause ...
2
votes
2answers
65 views
Assertions C# + When to use them
I have seen couple of posts regarding usage of Debug.Assert in C#.
But I still have one doubt, may be its repeated, but I need to ask.
Is there a strict rule that Debug.Assert should be used only for ...
1
vote
1answer
38 views
DebuggerDisplay attribute on a DebuggerTypeProxy Class
When using [DebuggerDisplay("{OneLineAddress}")] on the debugger proxy'd class, it does not seem to work. Is there something I'm doing wrong? Or some way around this without adding code to the ...
0
votes
1answer
43 views
C# Microsoft HPC IScheduler - Debugging Issue
I have an issue to run a simple code (Hello World) on Microsoft HPC. The code has a breakpoint. After compiling the code in the debug mode, when I submit the executable to the node ( the one I am ...
0
votes
2answers
52 views
Setting start page when debugging ASP.NET not working
I am using Visual Studio 2012.
In my solution explorer I would normally right click on a ASPX file and click on "Set as Start Page". When running the website, it would then start with that page.
...