debugging

Are there any Debugging Patterns?

Hi, I know there are many popular and useful Design Patters. Are there something like them for debugging scenarios? Maybe not patterns but methodologies which are categorized and that can be used repeatedly for similar cases. Any idea? thanks. ...

How can I get all the .pdb files in the same folder?

I have a solution in Visual Studio 2008, it has dozens of projects. I would like to have all the pdb in the same folder. From the property page of a project I see that the pdb will go to the "Intermediate Directory"; also .obj files go to the "Intermediate Directory". Each of our projects has its own folder because we want to keep the...

How can I debug a Perl CGI script?

I inherited a legacy Perl script from an old server which is being removed. The script needs to be implemented on a new server. I've got it on the new server. The script is pretty simple; it connects via expect & ssh to network devices and gathers data. For debugging purposes, I'm only working with the portion that gathers a list of ...

Debugging WPF browser applications gives a download file.

Hi, I have built an application for my college work in WPF browser, but when I try to debug, Firefox opens and gives me a download of the xbap file, which should run in the browser. This happens in VS2008 Express and VS2010 beta. I have tried in Internet Explorer and Chrome with the same result. .NET is framework is installed right upto...

Why does my Perl unit test fail in EPIC but work in the debugger?

Has anyone ever experienced a unit test that fails and when they tried to debug it to find out where the failure was occurring, the unit test succeeds when running the code in the debugger? I'm using Eclipse 3.5.1 with EPIC 0.6.35 and ActiveState ActivePerl 5.10.0. I wrote module A and module B both with multiple routines. A routine...

How to avoid debugger-only variables?

I commonly place into variables values that are only used once after assignment. I do this to make debugging more convenient later, as I'm able to hover the value on the one line where it's later used. For example, this code doesn't let you hover the value of GetFoo(): return GetFoo(); But this code does: var foo = GetFoo(); return...

how to avoid triggering properties while debugging?

is there a way to prevent triggering of property getter code while watching variables in debug? something in the style of the DebuggerStepThrough attribute? ...

Smarty is very slow sometimes

We use Smarty and time to time it really takes a lot of time for it to render a template. Normally it works fine, but sometimes (like 1 random pageview out of 1 000) it takes about 5 seconds to render a template. We don't use smarty functions or plugins, just simple variables. What might be wrong, where to look? Templates are already com...

Current Linux Kernel debugging techniques

A linux machine freezes few hours after booting and running software (including custom drivers). I'm looking a method to debug such problem. Recently, there has been significant progress in Linux Kernel debugging techniques, hasn't it? I kindly ask to share some experience on the topic. ...

Is it possible to debug core dumps when using Java JNI?

My application is mostly Java but, for certain calculations, uses a C++ library. Our environment is Java 1.6 running on RedHat 3 (soon to be RedHat 5). My problem is that the C++ library is not thread-safe. To work around this, we run multiple, single-threaded "worker" processes and give them work to do from a central Work Manager, also...

Classic ASP super newbie question

OK, So I have recently moved into the world of Web development after spending quite a few years coding in a pretty simple proprietary language, and one of my first jobs is to tweak an old classic ASP page for one of our clients. I'm using Visual Studio 2008 to try debug some problems I am having, but the page won't load at all. If I brow...

Is there any way to use the command line to debug an ERB file?

Is there any way to use the command line to debug an ERB file? I would like to know if there is any way to get rdebug or rdebug-ide to do this. ...

How to efficiently write code and debug windows service project in visual studio?

How to efficiently write code and debug windows service project in visual studio? Visual Studio gives Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START ...

Is it possible to debug IIS without affecting all users of the service?

This may seem like a silly question, but we are having an issue debugging IIS in a shared test environment and I'm hoping that someone out there can give us an answer. We have a Windows Server 2003 that is running IIS 6 and sharepoint 2007. We are debugging locally on the server with visual studio 2008. When someone attaches the debug...

To understand Python's optparse

Thank you for quack in pointing out the off-by-one! The following code is my first attempt in writing code with Optparse. How can you fix the following bug in getting the help by Optparse? #!/usr/bin/env python import sys import os from optparse import OptionParser e = sys.argv[1] b = sys.argv[2] no = sys.argv[3] def set_figu(figu)...

How to make attach to process macro to attach to Native code?

I am using the following macro codeto attach to the debugger: process.Attach() Works, fine, but for some reasons it always attaches to the "Managed Code" (sort of default mode I guess) Is there any way to specify that I want to attach to a "Native code" too? ...

How to customize Visual Studio Console Debug window?

I'm curious if anyone has figured out how to create their own Debug Output window in Visual Studio. For applications without a real console window (e.g. web apps), writing Debug or Trace messages end up in the Debug output window along with every other message (including overly verbose DLL loading messages). It would be great if we coul...

proper use of assert.h in debugging

Hi! c++ with visual studio 2008 if i use assert() from assert.h and compile in debug mode, the application crashes if the assert condition doesn't hold and it prints me in the console on what line in what file this happened. that's quite useful, but i'd prefere to trap into the debugger at this position instead, if the condition doesn'...

PHP: Understanding code via function or file tracing (without XDebug)

I have inherited a moderately large PHP codebase. In order to better understand how it works, I'd like to be able to print to logs a function or file trace whenever I hit a page, so I can correlate pages with source code. Are there any tools I can install? I have root on the server, and so have the ability to install anything as far a...

Debug static file requests from IIS6

How can I debug what is being returned by IIS(6) when the response goes through proxies before getting to the browser? I have requests for static files which are being sent with the 'Accept-encoding: gzip' header. These are being gzipped correctly. However, if a 'Via: ' header (to redirect the response via a proxy) is also included the...