debugging

How do I see a disassembly of the machine code generated by the .net JITer?

How do I see a disassembly of the machine code generated by the .net JITer? The Show disassembly window menu option is no where to be found. Even the tool bar button for it is in the disabled state. If I recall correctly the disassembly can indeed be seen but one must resort to some trick, unfortunately I don't remember what that trick w...

What does the suffix #DEN mean on the value of a variable

When debugging in VS2005 I have a float in the Locals window whose values is: 1.744e-039#DEN What does the #DEN signify/stand for? ...

Investigating python process to see what's eating CPU

I have a python process (Pylons webapp) that is constantly using 10-30% of CPU. I'll improve/tune logging to get some insight of what's going on, but until then, are there any tools/techniques that allow to see what python process is doing, how many and how busy threads it has etc? Update: configured access log which shows that there ...

Implementing a no-op std::ostream

Hi, I'm looking at making a logging class which has members like Info, Error etc that can configurably output to console, file, or to nowhere. For efficiency, I would like to avoid the overhead of formatting messages that are going to be thrown away (ie info messages when not running in a verbose mode). If I implement a custom std::st...

How to debug a windows service using breakpoints?

I have a windows service with a timer. Its very hard to debug it. Because I start the service and put break points in different parts of the code. When I attach the process, I expect the service to start from the very beginning instead of some randome place in the middle code where I have break points. Its hard to debug like a normal app...

Xcode / Cocoa : What are the differences between debug and release builds?

What are the differences between debug and release builds for a Cocoa application? I know the debug version contains additional information for debugging but what else is different? ...

Debugging unit tests with resharper

Hi, I've just started using resharper and I found a very annoying thing about it. When debugging a unit test, I try to step-into (F11) a method, but visual studio complains that source code is not available. The problem is that resharper is wrapping method calls with its own classes. Of course I can put a braeakpoint further in my source...

Debugging Silverlight Bindings

I have a binding in Silverlight that is causing my application to exit. An unhandled exception is not throw; I just get a white screen. I am not seeing anything from the binding engine in the output window. Does anyone have any ideas for debugging this issue? ...

Is it worth using Debug.Assert in ASP.NET?

It seems like a fairly large hassle to set up a proper debug environment in ASP.NET and I'm just wondering if using Asserts are the way to go or not. I've read a bit and saw that you need to modify your web.config to properly use Asserts. Is this usually the best way to go or are there other methods of debugging that might be easier to u...

GDB: Getting a symbol name from a memory address

I'm not sure if the following is possible, but can one retrieve the name of a symbol that a memory address points to in GDB? For instance, I know that 0x46767f0 belongs to an NSString*, is there any way I can find out what NSString it is to help me find some bugs I'm after? Thanks! ...

Testing a Mac-developed WebApp with IE through Virtualization?

Hello, I'm currently developing a Java-based web application on my MacBook. Most of my testing is on Firefox and Safari, but some clients have expressed interest in using the app on Internet Explorer with WinXP and Vista. I know I'll have some serious client-side / Ajax debugging, adjustements to do. I do have a Fusion guest with WinXP...

What is the most obfuscated code you've had to fix?

Most programmers will have had the experience of debugging/fixing someone else's code. Sometimes that "someone else's code" is so obfuscated it's bad enough trying to understand what it's doing. What's the worst (most obfuscated) code you've had to debug/fix? If you didn't throw it away and recode it from scratch, well why didn't you? ...

How to step into C/C++ DLL from C# application while debugging

I have two project in my solution: C/C++ Win32 DLL and some C# application. What I have to do to be able to step into DLL while debugging? I switched on all debugging options in C++ project's settings and copied to C# application root next files: MyLib.dll, MyLib.pdb, vc90.pdb, vc90.idb, but it doesn't helped. What additional actions ...

How to make this Matrix class easier to use in the debugger

I've written a C++ matrix template class. It's parameterized by its dimensions and by its datatype: template<int NRows, int NCols, typename T> struct Mat { typedef Mat<NRows, NCols, T> MyType; typedef T value_type; typedef const T *const_iterator; typedef T *iterator; enum { NumRows = NRows }; enum { NumCols = ...

In Visual Studio (2008), can I start up a website debug session as the web root?

I have a website in my solution, let's assume it is in a folder called /Solution/Website1. When I debug it in Visual Studio, it will come up as http://localhost:someport/Website1. I want it to start as http://localhost:someport. Is this possible? ...

Using Visual Studio macro names to launch external applications doesn't work?

Using Visual Studio / C#, I've been debugging some nunit tests recently, and am now trying to make sure that if we branch the code that the unit tests don't stop working in debug mode. I have this working by changing project properties to launch NUnit as an external program: C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe ..and th...

Visual Studio 2005 C++ runtime new exception

I have a VS 2005 C++ project with both Debug and Release builds. I've attempted the following 4 things: Build a Debug executable through Visual Studio, and run it through Visual Studio. Run the executable built in (1) externally via command line (Cygwin) after cd'ing to vstudio/debug. Build a Release executable through Visual Studio, ...

Debugging a release version of a DLL (with PDB file)

If I have a DLL (that was built in release-mode) and the corresponding PDB file, is it possible to debug (step-into) classes/methods contained in that DLL? If so, what are the required steps/configuration (e.g. where to put the PDB file)? Edit: If have the PDB file in the same place as the DLL (in the bin/debug directory of a simple c...

What are the basics someone should know for Testing and Debugging on OS X or Linux?

I have a few of our senior QA engineers in town for a few days and I am in the process of prepping them for testing an app that we are porting to Linux and OS X. These guys are smart. While they are not programmers they do understand things like how to open memory dumps to find the function pointer, and write simple python to help autom...

Objective-C: How to get class and runtime information?

Hi all, For debugging purposes, I'd like to display as much class information as I can, and possibly runtime information (which thread does the class/function run in, etc) into the console. Is there an easy way to do this with a function, variable or even (external) framework? P.S: I'm using Cocoa Touch. ...