debugging

VS.NET "watched" objects and recursive depth

In VS.NET, when you add an item to the watch, why is the base property often (always??) endlessly recursive? ...

Telling bugs and features apart?

Have you ever been in the situation when looking at the code you couldn’t tell if something is a bug or poorly implemented feature? Or you simply didn’t dare to fix something that looked like a definite bug to you, but were not sure if anyone already relies on the functionality behaving in a certain way? What are your best heuristics ...

Debugging greasemonkey-like scripts

I'm writing javascript code that is read in as a string and executed via eval() by a firefox extension. Firebug does "see" my script so I am not able to use breakpoints, see objects, etc. I am currently using Firefox's error console which I'm starting to find limiting. What are my other options? Ideally, I would be able to use Firebug ...

How does SetUnhandledExceptionFilter work in .NET WinForms applications?

I am working on a project to enhance our production debugging capabilities. Our goal is to reliably produce a minidump on any unhandled exception, whether the exception is managed or unmanaged, and whether it occurs on a managed or unmanaged thread. We use the excellent ClrDump library for this currently, but it does not quite provide ...

How do I print the full value of a long string in gdb?

I want to print the full length of a C-string in GDB. By default it's being abbreviated, how do I force GDB to print the string in full? ...

Disabled breakpoints disappear, no more red dot?

In previous versions of VS, if you right-clicked a breakpoint's red dot and selected Disable Breakpoint, the dot would become 'hollow', and clicking it again would re-enable it. But in VS2008, disabling the breakpoint removes the red dot entirely and you need to go to the Breakpoints window to re-enable. Anyone know how to get the previ...

How can I list the methods of a JavaScript object in VS command window?

When debugging JavaScript in Visual Studio 2008 and I use the ? command in the command window to list a JavaScript object's members I always get that ellipses {...}. Example: >? Page_Validators {...} [0]: {object} [1]: {object} [2]: {object} [3]: {object} [4]: {object} [5]: {object} length: 6 I'm assuming...

Thread dump programmatically /JDI (Java Debugger Interface)

I like to generate a thread dump programmatically. I've learned that there a basically two ways to do it: Use the "Java Virtual Machine Tool Interface" JVM-TI Use the higher abstracted "Java Debugger Interface" JDI For the JVM-TI I was able to find some useful information, but I would have to write a JNI-DLL which, at least for the m...

How do I Refresh Excel whilst Debugging

If I am debugging (in this case a Visual Studio assembly called by Excel) and the code updates the Excel worksheet, how do I get Excel to redraw the current sheet / window whilst paused in the debugger? ...

What kind of data to collect for post-mortem root cause analysis - thread dumps of application and snapshot of database

how do i create thread dump of application and snapshot of database? Especially is i cannot collect directly but instead have to raise a service request to system administrator for this. ...

How do you encourage someone to learn to use the debugger?

We are in college and I want get my projectmate to use the debugger as it will help improve his debugging speed. Despite offering to show him how to use it so that he won't have to learn it by himself, he refuses and to date still uses printlining to debug. I can understand why he refuses as he's probably afraid of the learning curve (E...

Starting python debugger automatically on error

This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let's say an IndexError, python prints the line, location and quick description of the error and exits. Is it possible to automatically start pdb when an error is encountered? I am not against hav...

Non localized error messages in Asp.net

I've got a Polish version of Windows installed and therefore I get exception messages in Polish. Is there a way to make asp.net display error messages in English? Other than installing English version of Windows. ...

How do I set a Data Breakpoint in mixed( C#/C++ ) debugging?

I launch my program in C#, which then calls some unmanaged C++. When I break on a line in the unmanaged C++, the 'New Data Breakpoint' menu item is grayed out. Is there anyway around this? ...

Can you modify CPU registers from within VS2008 IDE?

Was just wondering if there was a way to edit the CPU registers (i.e. EAX, EBX, ECX, etc) or flags (OV, UP, erc) from within the Visual Studio IDE. I know you can view them using the Registers pane (ctrl-shift-G) and you can cycle through them with TAB or ENTER, but I don't seem to be able to change any of them while debugging (yes, pro...

How to debug in VI

Using vim 7.1, I recently heard you can debug php in VI. But how? ...

Debugging .NET dynamic methods

We are using LINQ very widely in our system. Particularly LINQ-to-objects. So in some places we end up having a LINQ query in memory build up from some huge expressions. The problem comes when there's some bug in the expressions. So we get NullReferenceException and the stack trace leads us nowhere (to [Lightweight Function]). The except...

VS2008 C# Exceptions with methods invoked by reflection

If I invoke a method which does something illegal, the debugger will stop at the line of code, in that method, which threw the exception If I use reflection to call a method via Invoke and that method throws an exception, the debugger stops on line where the method was called via reflection and not in the faulty method itself How do ...

How Do I Use Eclipse to Debug a C++ Program on Linux?

I don't use Eclipse as an IDE, and have no interest in doing so. However, I do like its source-level debugging. Is there any way I can use it to debug a C++ Linux app without going through the ritual of creating a project? (In effect, can I just use it like a frontend to gdb?) If not, what are the steps I need to follow to create a p...

Debugging a Direct3D Model

I am trying to render a model in Direct3D using DrawIndexedPrimitives. However, I am not able to see it on screen. What are the usual methods used to debug a Direct3D model? I've tried the following: Switched off back face culling Used PrimitiveType.LineStrip instead of PrimitiveType.TriangleStrip Several combinations of View and Proj...