debugging

PPC breakpoints

How is a breakpoint implemented on PPC (On OS X, to be specific)? For example, on x86 it's typically done with the INT 3 instruction (0xCC) -- is there an instruction comparable to this for ppc? Or is there some other way they're set/implemented? ...

multi file C program, how best to implement optional logging?

I have a multi file C program. I'd like the user to be able to specify different debugging levels at run time. What is the best way to implement this? I was thinking of having a debug(level, "message") type function exported and used everywhere. Any better/other ideas? ...

what are the techniques you follow if you are stuck with a programming problem

When I am stuck with a problem, I search Google for code snippets. I look at isolating the problem, so that I can better explain it to others in order to get answers. What are the search techniques you use to find the solution to your problem? I started asking questions in stackoverflow.com . What other techniques or methods do you fo...

Why does Visual Studio launch multiple WebDevs when I debug?

I have a Visual Studio 2008 solution with several projects in it - some of which are web applications / sites. Whenever I go "Debug > Start new instance" for a specific web application and VS launches the ASP.net Development Server (WebDev.WebServer.EXE) for that application, VS also launches 3 additional such processes - one for each ...

How do I debug an MPI program?

I have an MPI program which compiles and runs, but I would like to step through it to make sure nothing bizarre is happening. Ideally, I would like a simple way to attach GDB to any particular process, but I'm not really sure whether that's possible or how to do it. An alternative would be having each process write debug output to a sepa...

Debugging j2me on a Device

Has anybody had any success ever attaching a debugger to a tethered device? I am able to debug my j2me application in the emulator, but have a lot of trouble sorting out phone-specific problems when they come up. The phone I'm using is a Nokia N95, but ideally the debug process would work on any phone. Is this possible? If so does an...

Debugging in a dll with both managed / unmanaged code fails in VS 2005. Why?

I want to debug a piece of code written in C++. The problem is that the dll is mixed - it contains both C++ and CLI (managed C++). The environment is VS 2005. My entry point is a very simple executable project, written in C++ that just starts the code in the mixed dll. The problem is that: if I let the "Debug type" as Auto for both...

c# contextswitchdeadlock

Hi Whilst debugging my program in VS 2008 I have come across the following error: The CLR has been unable to transition from COM context 0x34fc1a0 to COM context 0x34fc258 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation wi...

Is it possible to start an external program from the target directory when debugging?

When debugging I need to start an external program from the target directory of a build and am wondering if it can be accomplished using relative paths. As a post-build event I have the following: IF NOT "$(ConfigurationName)"=="Debug" GOTO End :CopyExecutable copy "$(SolutionDir)\Source\Lib\MyExecutable.exe" "$(TargetDir)" :End I n...

What is a debug working set (Eclipse)?

I'm using Eclipse IDE and notice an option in the Debug perspective in the Breakpoints view that allows me to chose/create a working set. I've found all kinds of help online that tells me how to make a working set or choose a working set, but nothing that explains what a working set is or why I'd want to use one. ...

"Step over" when debugging multithreaded programs in visual studio

One thing that annoys me when debugging programs in visual studio (2005 in my case) is that when I use "step over" (by pressing F10) to execute to the next line of code, I often end up reaching that particular line of code in a totally different thread than the one I was looking at. This means that all the context of what I was doing was...

Debugging a User Control from ASP.NET

I have an ASP.NET (2.0) site. I am on my dev box using V Studio 2008 and IIS. I have a separate User Control project that gets called from a javascript function in the default.aspx page. The User Control project is in another solution. The application is running as expected. The user control is being called and all is well. Well not qui...

Removing code from Release build in .NET

I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems that all code related to the static class Debug gets completely removed when the Release configuration is built. I was wondering how the compiler knows that. Maybe there is some class or configuration attribute that allows to specify exactly...

What are some reasons I might be receiving this "Symbol not defined" error in Visual Studio 2005 (screenshot included)

When debugging my VS2005 project, I get the following error when I attempt to step into the function that returns the vScenarioDescriptions local variable it's struggling with... As I continue to walk through the code and step into functions, it appears I'm getting this error other local variables as well. Any ideas? Thanks in advan...

Debugging Developer Fabric Issues - Service Not Starting Web Components

Hello, I am trying to get the Azure SDK up and running on my dev PC and have been having some issues. I have installed the SDK, tools for VS and am trying to run the samples. Every time I try to run the samples the Development Storage service starts and then the Developer Fabric tries to start. This is where is stops. The Developer Fa...

How can I debug with a single proc on a multi-proc system?

My development machine is a quad core system, but I just ran into ( and I am still debugging ), and problem when my application is deployed to single processor systems. I get a dead lock. I would like to be able to debug using only a single processor, rather than having to build a development VM to debug with. Is it possible to tell V...

PHP debugging - where to set the breakpoints? how to authenticate?

So I've just recently made the step from ad hoc debugging with dump, print_r and echo to some more sophisticated methods and I'm having a struggle. I work with Zend Framework, Aptana and Zend Debugger. At this moment I'm trying to debug a custom controller and whatever I try I don't get to my breakpoint which I understand since there ...

Current Classes Loaded Constantly Increasing - Memory Leak

I've got a service that has a very slow memory leak. If I analyze the .NET CLR Loading counters, I see that the Current Classes Loaded counter is constantly increasing and matches Total Classes Loaded counter at all times. This gives me the impression that the memory leak is related to resources not being freed (This is just a guess). ...

How to find unclosed connection? Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I've had this problem before and found that basically I've got a connection that I'm not closing quickly enough (leaving connections open and waiting for garbage collection isn't really a best practice). Now I'm getting it again but I can't seem to find where I'm leaving my connections open. By the time is see the error the database has...

Diagnosing Programming Errors

We've all hit those errors that take hours/days to debug, only to find it was because of a misplaced assumption, wrong input data, or some other unseemly error. As an example, I just spent 6 hours trying to find an error in a stored procedure. It fired fine in Query Analyzer, but failed in code. The end result was a space that didn't ...