debugging

How to incorporate Interactive Ruby into my development process?

I am trying to find a better way to integrate IRB with my normal ruby devleopment. Currently I rarely use IRB with my code. I only use it to verify syntax or to try something small. I know I can load my own code into ruby as a require 'mycode' but this usually doesn't mesh with my programming style. Sometimes the variables I wan...

Debugging SharePoint 2007 Code

How do you debug your SharePoint 2007 code? Since SharePoint runs on a remote server, and I'm developing on a windows xp machine (with the necessary .dll files copied into my GAC), I haven't had much luck with finding easy ways to debug. Breakpoints don't work, etc. The best way I've come up with is to enable page tracing in the web.c...

gu and pc command of Windbg

Hello everyone, Could anyone show me a sample about how to use these two commands in Windbg please? I read the document in debugger.chm, but confused. I did search in Google and MSDN, but not find an easy to learn sample. thanks in advance, George ...

.gdbinit config file conflict with Xcode debugging

I've a fairly huge .gdbinit (hence not copied here) in my home directory. Now if I want to debug code inside Xcode I get this error: Failed to load debugging library at: /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib Custom data formatters are disabled....

How can addChild choose the wrong insertion index?

So, In a Flex app I add a new GUI component by creating it and calling parent.addChild(). However in some cases, this causes an error in the bowels of Flex. Turns out, addChild actually does: return addChildAt(child, numChildren); In the cases where it breaks, somehow the numChildren is off by one. Leading to this error: RangeErro...

Logging/monitoring all function calls from an application

Hi, we have a problem with an application we're developing. Very seldom, like once in a hundred, the application crashes at start up. When the crash happens it brings down the whole system, the computer starts to beep and freezes up completely, the only way to recover is to turn off the power (we're using Windows XP). The rarity of the ...

Microsoft JET SQL Query Logging or "How do I debug my customer's program?"

The problem: We use a program written by our biggest customer to receive orders, book tranports and do other order-related stuff. We have no other chance but to use the program and the customer is very unsupportive when it comes to problems with their program. We just have to live with the program. Now this program is most of the time ...

How do I setup remote debugging from scratch for an Asp.Net app

I would like to be able to step through an application deployed to a remote location which as yet has nothing bar version 3.5 of the .Net framework. What steps do I need to go through to achieve this and how long would you envisage this taking? ...

Flex/Flash Debugging in the Browser

I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I need to see the error that the Flash/Flex app is getting from the ASP.NET app. Is there any way to debug the response that Flash/Flex is getting? ...

What do you do if you cannot resolve a bug?

Did you ever had a bug in your code, you could not resolve? I hope I'm not the only one out there, who made this experience ... There exist some classes of bugs, that are very hard to track down: timing-related bugs (that occur during inter-process-communication for example) memory-related bugs (most of you know appropriate examples, ...

Exception thrown in a referenced .dll how do I debug?

I'm using watermark extenders on textboxes and an exception is being thrown from the AJAX Control Toolkit .dll. It's strange because this just started happening. I tried debugging from the Ajax solution and Ajax examples (but with my code), but no dice. Is there a way to step into the Ajax .dll from my solution to see where this is ...

How to execute GetLastError() while debugging in Visual Studio

You're stepping through C/C++ code and have just called a Win32 API that has failed (typically by returning some unhelpful generic error code, like 0). Your code doesn't make a subsequent GetLastError() call whose return value you could inspect for further error information. How can you get the error value without recompiling and repro...

How to put breakpoint in every function of .cpp file?

Is there a macro that does it? Which DTE objects to use? ...

Visual Studio Debugger + Break when a value changes?

I've always wondered if there was a way to place a watch on variable and only have visual studio break when that value changes...it would make it so much easier to find tricky state issues. Does anyone know if this can be done? EDIT: Breakpoint conditions still need a breakpoint set, I'd rather set a watch and VS set the breakpoints at...

Compile error in VS.NET 2008 (VB.NET) that I can't get rid of!!

I can't shake this error when compiling my Visual Studio.NET 2008 solution. The project that's generating the error is a VB.NET Web Application in a 12 project solution (mixed types and languages). I've tried all the tricks I can find on google, and the obvious of removing the directoy and folder manually. I'm running Vista Business 3...

How to simulate a Delphi breakpoint in code?

I am pretty sure I have seen this before, but I haven't found out / remembered how to do it. I want to have a line of code that when executed from the Delphi debugger I want the debugger to pop-up like there was a break point on that line. Something like: FooBar := Foo(Bar); SimulateBreakPoint; // Cause break point to occur in Delph...

Windbg: How to set breakpoint on one of the overloads of a C++ function?

I have two overloads of a c++ function and I would like to set a breakpoint on one of them: 0:000> bu myexe!displayerror Matched: 00000000`ff3c6100 myexe!displayError (int, HRESULT, wchar_t *) Matched: 00000000`ff3c60d0 myexe!displayError (int, HRESULT) Ambiguous symbol error at 'myexe!displayerror' Heck I would be fine with setting b...

With WinDbg, can I modify an item in memory while a process is running?

Can I, using an address found in a map file, use windbg to alter a variable in memory while the app is running? I'm really interested in turning on/off functionality in run-time maybe with a variable. How would you do this? Does it require breaking the app through the debugger? ...

Why do I get an error after closing my Winforms application?

When I run my vs.net winforms application by clicking F5 (debug mode), after I click on the close (which calls Application.Exit();), after a few seconds I get an error that says: cannot acess a disposed object: Object name 'SampleForm'. A bit of background, I have another thread that runs every x seconds. My guess is that when I c...

Breakpoint not hooked up when debugging in VS.Net 2005

Been running into this problem lately... When debugging an app in VS.Net 2005, breakpoints are not connected. Error indicates that the compiled code is not the same as the running version and therefore there's a mismatch that causes the breakpoint to be disconnected. Cleaned solution of all bin file and re-compile doesn't help. Not j...