debugging

How to add a conditional breakpoint in Visual C++

I want to add a breakpoint condition to my code in VC++ Express 2005, so that the breakpoint only triggers if a local variable meets a specified criteria. e.g. bool my_test(UIDList test_list) { foo(test_list); bar(test_list); // I have a breakpoint here, but only want it to trigger if test_list.Length() > 0 print(test_list);...

How error like "Event ID 26 Source Application Popup" can help

I have this error like at service windows, this occurs one time a week or more: Application popup: application_name - Application Error : The instruction at memory_location referenced memory at memory_location. The memory could not be "read". production environment; multi-thread app; each thread performs a task; source is C++, VC8; ha...

Tricks to speed up Jboss Seam debug cycle

We deploy and debug a Jboss Seam 2.0 EAR app from within eclipse, booting it on Jboss AS 4.2.2. Right now we need to reboot it every time we change the message bundle, pages.xml, components.xml, or the model, which takes up to 45 seconds. Is it possible to include aforementioned files in hot deployment, and what are the options for boos...

Visual Studio always on top when debugging

When I start debugging the project we are currently working on, the program window is not given proper focus in windows but is stacked behind the Visual Studio window. I don't think this problem occurs on any of my team members computers, so it looks like it's a problem on my system. Is there a setting in VS2008 for always on top or som...

(Re)Enabling JavaScript debugger in IE7 with Visual Studio 2008

Visual Studio 2008 comes with nice javascript debugging features. But I have played a little with NetBeans debugger wich has installed an ugly Script Debugger from Microsoft to my IE... Normally IE should ask what do I want to use for debugging, but now I can't start debugging with Visual Studio, the Script Debugger is started automatic...

What is your favorite open source debugging tool?

I've been giving a talk recently on a plethora of Open Source (some are borderline open-source, I'll admit) debugging tools and the audiences have been making great additions to my list. I'd like to gather the knowledge (and give credit) to the oft-brilliant StackOverflow crowd on this same question. There are no WebService/Java/.Net/H...

Determine list of event handlers bound to event

I have a WinForms form that won't close. In OnFormClosing, e.Cancel is set to true. I am guessing that some object in my application has bound to the Closing or FormClosing event, and is blocking the close. To find out, I'd like to determine what delegates are bound to one of these events. Is there a way to determine the list of handler...

Can I make pdb start debugging right away?

I want to debug a python project The problem is, I don't know where to set a break point, what I want to do, is be able to call a method SomeClass( some_ctor_arguments ).some_method()` and have the debugger be fired right away How do I do that? I tried pdb.run( string_command ) but it doesn't seem to work right >>> import pdb >>...

Visual Studio/C++: How to turn off certain first-chance exception debug messages?

When I execute my C++ code (which uses the CGAL library) under debug mode, I see a lot of debug messages in the Output window about a first-chance exception CGAL::Uncertain_conversion_exception. I am aware of what a first-chance exception is. Now, how do I turn off the display of debug messages for this one kind of exception (CGAL::Unce...

How to debug a watchdog timeout

I have a watchdog in my microcontroller that if it is not kicked, will reset the processor. My applications runs fine for a while but will eventually reset because the watchdog did not get kicked. If I step through the program it works fine. What are some ways to debug this? EDIT: Conclusion: The way I found my bug was the watchdog b...

Setting breakpoint on the first line of an anonymous Javascript function in Visual Studio 2008

I am having problems using the Visual Studio 2008 Javascript debugger. I can’t set the breakpoint on the first line of an anonymous function. Given that most Javascript is written using namespaces these days, this means that you can’t set the breakpoint on the first line of most Javascript function. Looking on google (e.g this) and co...

Testing/Debugging website running on iis 6.0 and 7.0 with an xp development environment?

Considering iis 6.0 and above can't run on xp what options have i available? Remote debugging (using a win 2k3 host) i'm aware of but i might not have the facilities available very easily ...

Detect terminated hung application

I created a minimal debug loop which runs and debugs a process. When the process hangs and the user tries to close it, Windows gives the message box with the option to wait or end now. I would like to try to detect when they hit end now, so my debugger can gather relevant information. However I cannot seem to figure out how to detect th...

Why can't I debug from Visual Studio 2005 after installing IE8?

I've just installed IE8 (final) and restarted. I can no longer debug Web Application Projects using Visual Studio 2005 on Windows Server 2003 Enterprise R2. I get the message "Internet Explorer cannot display the webpage" and then WebDev.WebServer.exe quits with no visible error message and nothing in the Event Viewer. Does anyone have ...

What is the best way to attach a debugger to a process in VC++ at just the right point in time?

When debugging, sometimes you need to attach an already running process instead of just starting the application in a debugger. It's common for myself to put in a Sleep() or MessageBox call, so that it's easier to attach a debugger. I worry that some of these may be committed eventually to source control. What is the best thing to do...

program runs when launched by make, but not via shell - crazy nonsense!

I wrote a C program in which I did some pretty heavy stack allocation, around 2 MiB. Since I use the poor man's IDE* I was automatically running the program via make in order to test it, each time I compiled. I had pretty much wrapped everything up, but for some reason, during some of the final optimization, I ran it directly from the s...

Debugging mobile software in the VS device emulator - app switching to background

I have this issue when debugging mobile apps on the emulator. When I press F5, the build starts, then the deploy, then the app pops up in the emulator. Because this takes a minute or 2, I am checking my SO score and maybe ask a question while I wait, and the emulator is in the background. When I finally switch back to the emulator, it sh...

Debugging a tomcat project in Eclipse 3.4.2

Hi, I downloaded eclipse 3.4.2 and tried installing tomcat plugin (version 3.2.1)for eclipse from sysdeo (http://www.eclipsetotale.com/tomcatPlugin.html) I have followed installation instructions but when is start tomcat from eclipse toolbar i got the following error java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/SystemLo...

Background Worker Event Handling

I've been struggling with event handling in backgroundworker threads. All the documentation I've come across make me believe that when a DoWork event handler throws an exception that exception should be dealt with in the RunWorkerCompleted handler and that exception will be available in the Error property of the RunWorkerCompletedEvent...

static methods fine in debug but throwing TypeInitializationException in release

banging my head on this one. I have a static method with fields in a class similar to this: public MyClass { private static string m_myString; public static MyClass() { m_myString = "hello world"; } public static void MyUsefulMethod(Foo bar) { DoStuffTo(bar); } } In Debug mode, I have no issue but...