debugging

C# - Visual Studio 2008 capable of Conditional Compilation?

Referring to the "Configuration Manager" under the Build menu. Is there a way to comment my C# code so that the commented out code does not compile while the solution is in Debug mode, but would compile if I changed it to Release mode? Update: Judging by the answers, I should have said why I wanted this. The reason I want to have code...

Is it possible to pass a variable out of a pdb session into the original interactive session?

I am using pdb to examine a script having called run -d in an ipython session. It would be useful to be able to plot some of the variables but I need them in the main ipython environment in order to do that. So what I am looking for is some way to make a variable available back in the main interactive session after I quit pdb. If you ...

Is it a bad idea to leave firebug "console.log" calls in your producton JavaScript code?

I have a bunch of console.log calls in my JavaScript. Should I comment them out before I deploy to production? I'd like to just leave them there so I don't have to go to the trouble of removing the comments later on if I need to do any more debugging. Is this a bad idea? ...

Run an Application in GDB Until an Exception Occurs

I'm working on a multithreaded application, and I want to debug it using GDB. Problem is, one of my threads keeps dying with the message: pure virtual method called terminate called without an active exception Abort I know the cause of that message, but I have no idea where in my thread it occurs. A backtrace would really be helpful....

Error message with WCF WSDualHttpBinding: Unable to automatically debug service

I'm currently working on a solution which needs to use both Silverlight 3.0 and standard .NET applications as clients to a web service implemented with WCF. The portions of the web service consumed by the Silverlight client need duplex functionality, so I'm using the (still fairly new) PollingDuplexBindingElement on one end point of my ...

Inject to NPSWF32.dll & Flash10a.ocx & flashplayer.xpt to create a global ActionScript VM console and debugger?

Hi all, since all browser's Flash plugin is based on: NPSWF32.dll Flash10a.ocx flashplayer.xpt Is there a way to inject these dll's, use some voodoo to create a global ActionScript VM console and debugger? Perhaps then I can submit arbitary score to any online Flash games? ...

How can I debug the binding of my ViewModels to my View?

I have this ItemsControl in my View: <ItemsControl ItemsSource="{Binding ItemPageItemViewModels}" ItemTemplate="{StaticResource ItemPageItemViewModelsTemplate}"/> And above it I have this DataTemplate which renders all the items: <DataTemplate x:Key="ItemPageItemViewModelsTemplate"> <TextBlock Text="{Binding Title}"/> </...

How to debug in Django, the good way?

So, I started learning to code in Python and later Django. The first times it was hard looking at tracebacks and actually figure out what I did wrong and where the syntax error was. Some time has passed now and some way along the way, I guess I got a routine in debugging my Django code. As this was done early in my coding experience, I s...

Evaluate SPListItem field values using debugger

How do I evaluate SPListItem field values using VS debugger? Best I get is only a list of Field names, but not values. ...

Paypal - How can i debug IPN locally?

Currently i am working on the sandbox. Is there any way of forwarding (e.x via my router) the IPN's of the Notification URL to localhost, in order debugging it with Visual studio? ...

How to debug a application on a customers environment .NET

We have an application written in C# .NET that is currently used in production environments. Obviously the release build is used. Unfortunately sometimes the application misbehaves under certain conditions and we can't figure out why. We are unable to reproduce the issue in house. Yes, more tracing would help, but often it is after the ...

Breakpoint does not work after a managed allocation in a windows service.

I have a Windows service implemented in C++. It is mostly native code but has a dll which is .net. I use __debugbreak() to force the debugger open at a breakpoint if there is an error during service start up. The breakpoint works fine until I call gcnew on a managed class ( with an empty constructor!) from the native code. After th...

does an incorrect comment smell?

I just had a situation where I was reading some code while working on a bug and I noticed an incorrect comment (the code did not do what the comment said it did). I just thought "hmm, ok" and went on working on the bug. About an hour later I was back at that line of code, having determined that it had caused the bug. In fact, if the c...

How do I grep (search) a Crystal report for all uses of a column?

I am trying to remove all references to a table from a Crystal XI report. Crystal is telling me that a column from that table is currently being used, because there is a little green check mark over the field in the field viewer. Also, if I try to remove the entire table, I get a warning. The warning is almost useless though because i...

Software tools for recording non-reproducible bugs

Hello! Obviously the non-reproducible bugs are the hardest to fix due to the nature of their cause (i.e. race conditions), so we as programmers must do our best to gather data (i.e. logs, screenshots, etc.) and verify the bug documentation is accurate in an attempt to understand what happened. Can anyone recommend any software tools, o...

Iphone Error Terminating in response to SpringBoard's termination

I am testing my iphone application in the real phone and when my program running a few seconds. It exit automatically and show the message ' Terminating in response to SpringBoard's termination' and in console show program exit normally.It is wired, right? I try a few times and happened every time. The program is very simple and have...

How to configure PHPEd to run debug from within the subfolder of a workspace?

To debug a PHP app in PHPEd the root of the project needs to be set to the web folder of my app. However, the PHP files to be editted are outside of the web folder. Is it possible to configure PHPEd to run debug from within the /web folder, while displaying all of the PHP files in the workspace? Desired workspace layout ** Workspace ...

Is there a way to watch WPF Routed Events?

I was wondering if there's a way to watch all RoutedEvents that are raised in a WPF application. A way to write some info about the events fired to the console would be prefect to see what's going on. ...

How Can I Catch a Mysterious Process Killer?

We had this customer complaining out product was constantly crashing after running fine for 2-5 minutes. It took few days of guessing, but we came to the following conclusion: When the process is terminating without leaving any traces (event logs/crash dumps) there are two options: 1. Our own process is calling TerminateProcess() 2. S...

Break on Exception in Eclipse using jUnit

Is there a way to make Eclipse break on uncaught exceptions while in debug mode for jUnit? Eclipse breaks fine when executing main(). Is there a command-line switch I can use? Thanks ...