debugging

Insert Tracepoint: how to set the default message?

In MS VisualStudio (I'm using 2005), it's possible to right-click in some code file and 'insert tracepoint' right there. The default message printed when the tracepoint is hit is Function: $FUNCTION, Thread: $TID $TNAME. I would rather have it different (e.g. Thread: $TID [{(void*)this}::$FUNCTION]). Now it's easy to just type in the ...

Do you TDD for debugging fix?

Hi, I know there's a lot of stuff on TDD and i'm trying to pick up the practice too. But i wonder is it a good idea to to TDD your bug fix too? I was thinking along the lines of find the bug and narrow it down. Write unit test to ensure that it will now pass whatever problem that it previously caused. Write more unit test for other brea...

debugging javascript for IE6

firebug is quite useful tool that I can't think myself living without it. I also downloaded the js file that helps you get similar functionality when using IE6 hoping it would help me resolve some issues, however, the messages I receive are not quite friendly such as: "Expected ':' (default2.aspx,16)" - on line 16 there is nothing that ...

Port Mingw32 based code to msvc2008

We recently had a new requirement to use the phonon component of Qt, which on windows requires Visual Studio. I installed VS2008 and ran a compile. There are a stack of problems due to make not working anything like nmake. Since I need to maintain cross-platform I want to test which compiler is being used so that I can make changes as...

Printing detailed debugging output easily?

I'm basically looking for a way to automate typing stuff like the following: cout << "a[" << x << "][" << y << "] =\t" << a[x][y] << endl; Something like: PRINTDBG(a[x][y]); Ideally this would also work for PRINTDBG(func(arg1, arg2)); and even PRINTDBG(if(condition) func(foo);); (which would print e.g. "if(false) func(5)"). ...

Cannot set a breakpoint in aspx page running under WSS

In my SharePoint app, I deploy some aspx pages to the [12 Hive]\TEMPLATE\LAYOUTS folder. The pages are compiled in a debug mode, I'm copying both .apsx and .cs files. I used to be able to attach to w3wp.exe and set a breakpoint inside the .cs files and hit them just fine. Not today. I'm getting the dreaded "The breakpoint will not curren...

What do you use to Profile SQL Server 2005 Express?

I've got a problem on an SQL Server 2005 Express instance, and I need to see exactly what is being run, since what I believe is being run works fine when I run it from Management Studio. It appears that Profiler is not available for SQL Server 2005 Express. When I attempt to run SQL Server 2000 Profiler against the 2005 Express edition...

Explaining Debugging Symbols in MSVC++6

How would you explain "symbols" in a way that a novice programmer like myself would understand? What are they? Are they some sort of mapping to functions? I would like to learn more advanced debugging techniques and this term has been a roadblock for me. ...

How do I run 2 or more copies of the same WebSolution at the same time?

I have a solution with 8 seperate Web Apps which are required to redirect/link to each other on occasion. Also I use Subversion as my sourceControl and do development in one branch and bug fixing in another. Thus I can have more than one copy of the web suite on my machine at once. For the purposes of this question let's say they are ...

How to use Deblector?

I am working with a 3rd party framework, and the code is pretty bad, and I'm getting exceptions that I can't figure out. I was able to decompile using Reflector, and now I'm trying to debug using Deblector, but I can't even figure out how to get a breakpoint set. Why is there no documentation for this tool? There is nothing available abo...

Debugging CSS issues in IE7?

I need to debug some annoying CSS issues on IE7, I have the Internet Explorer Developer Toolbar installed. It is having trouble resolving all of the styles that are being applied. I am also using Firebug lite, it is helpful but way too basic. Debugging this stuff in Firefox is not an option due to the poor design of this intranet web...

WinDbg symbol resolution

When using WinDbg, where should the private symbol files (pdb?) be placed? My situation is: I have a DLL which I want to debug. I have the source code and symbol files for this DLL. This DLL is called by another DLL (which I don't have symbols or source for) which, in turn, is called by an EXE (which I also don't have symbols or source ...

How to trace and profile all low level calls (c libraries) being used by a mod_perl or a mod_php application?

I've seen once on a site, a call graph digging into the most low level libraries of a web request initiated by a PHP appplication with call timings and summary. Seems to me that this is a great way to spot the reason of bottlenecks that aren't obvious while profiling PHP-only code. Something like strace does but with far more detail. ...

IDebugSymbols::GetNameByOffset and overloaded functions

I'm using IDebugSymbols::GetNameByOffset and I'm finding that I get the same symbol name for different functions that overload the same name. E.g. The code I'm looking up the symbols for might be as follows: void SomeFunction(int) {..} void SomeFunction(float) {..} At runtime, when I have an address of an instruction from each of the...

TestNG, multiple suites, possible to merge reports?

So here's an issue at my work. I've got a few testng cases that, if run within the primary batch of test cases, wreak havock throughout the other test cases. Rather than going through and changing all our test cases, I've made a group for the involved cases. I run the main test suite, excluding that group, and then make a second ant call...

How to debug a beanshell script?

Hey Guys, I have troubles to debug a beanshell script all I get all the time is: Exception invoking imported object method. : at Line: 194 : in file: inline evaluation of: ``import java.lang.reflect.InvocationTargetException; import java.util.Arrays; i . . . '' : migrateModels ( models , apiManager , isSAPRetailImportCondition , isSA...

Using gdb, display multiple vars in one line?

Sorry in advanced gdb gurus, but how can I ask to display multiple vars in one line? So I want to get output like: 30 if(s[i] != '\0') 5: s[i] = 101 'e' 4: exp = 14 3: val = 123.45 2: sign = 1 1: i = 6 I've been typing in disp s[i] ENTER disp exp ENTER (etc, etc) and I just know there's got to be a better way to do this in one line ...

IIS 6.0 Application Pool crash

Have a lot of troubles on production server. Some routing cause crashing of Application Pool with event id 1011: Event Type: Warning Event Source: W3SVC Event Category: None Event ID: 1011 Date: 1/21/2009 Time: 9:08:17 AM User: N/A Computer: xxxxxxxxxxxxx Description: A process serving application pool 'Defaul...

Suggestions for Python debugging tools?

Yesterday I made a simulation using Python. I had a few difficulties with variables and debugging. Is there any software for Python, which provides a decent debugger? Related question: What is the best way to debug my Python code? ...

Visual Studio 2005 VB debugging with c++ dll - Mixed Language debugging

I have a vb project which calls functions in a dll. The dll is created in a separate vs project (portaudio), which is written in c. The dll c project compiles clean and builds the required dll, which I am currently dropping in c:\windows\system to vb runtime can see it. VB Project lives in c:\devprojects\vbtest C Project lives in c:\...