debugging

How can I debug a NUnit unit test using resharper?

I am running VS2008 with Resharper 4.1, NUnit 2.2.7, coding in c#. I would like to use an NUnit unit test as a debugging harness while I am developing the code. My test is in a different project than the method being tested, but in the same solution. I have put breakpoints into the unit test as well as the method being tested. VS is ...

Trace Filtering

How do I go about using filtering on the built in trace listeners, such as System.Diagnostics.DefaultTraceListener and System.Diagnostics.TextWriterTraceListener? I don't want to have to override write methods and explicitly check the filtering, but I can find no way to attach a level to trace information? ...

Have Firebug Break when a global variable X is defined

We have a very large JavaScript application where after many months of coding there have inevitably sprung a couple scope slip ups where a variable is defined in the following fashion: function() { x = 5; ... } instead of: function() { var x = 5; ... } This is happening somewhere -- We're not sure where -- and s...

debugging Error establishing mySQL database connection under extreme load

Under high traffic my mysql 5.0.45 server /Apache2/ CentOS 5 is getting "Error establishing mySQL database connection". I need to find the root cause. I would very much appreciate any pointer to information about the procedure I should take to find the cause (memory limit, thread limits, CPU load, slow queries etc, large dataset, wrong ...

Threaded debugging in C# and vs2008

Hi all, I have a pretty serious multithreaded debugging problem. I have some kind of timing issue when interacting with a serial device, and I need to track it down. I have three threads: The main thread for UI updates. The user can either change one parameter of the device, or many all at once by choosing a preset. The status chec...

How do I break a loop at a certain point when debugging?

Env: Visual Studio 2008 - C# I have a for which runs for 1000+ times over a string array. I want to have my app break when one of the strings matches a certain term so I can walk through at that point in my code. Now I know I can add a piece of code that looks for this and a break point when it hits, but is there not a way to do this ...

Finding JS error - "Stop running this script?"

I am working on a ASP.NET webpage that is rather complex with ajax, callbacks, javascript etc. I encounter this error intermittently: Stop running this script? A script on this page is causing IE to run slowly... Any help in finding the culprit is really appreciated. ...

.NET Log or View Call / Response of a SOAP WebService

What is the best way to inspect the calls & responses from a web service in .NET? I'm interacting with a Web Service written in Perl and running into issues. How can I capture the text of the call and response? UPDATE: Based on comment to clarify: I'd like to do it via .NET so I can log it or email it when an issue arises. ...

Question concerning Win32 Console app vs. CLR Console app

Hello, I'm working on a C++ project that I don't intend to develop or deploy using .NET libraries or tools, which means it would make sense for me to create it using a Visual Studio Win32 Console application. However, I've heard that the debugging abilities when using a CLR application under Visual Studio are much more powerful. So I ...

Why can't I drag execution point in IntelliJ (I can in Visual Studio)

In Visual Studio, when debugging, one can drag the execution point (current instruction pointer, yellow dot) to another place in the current method. This is impossible in IntelliJ, and some have stated it's generally impossible in Java. Why? ...

How can I have variable assertions in Perl?

How can I check that a variable has a specific value in Perl? Is there a command to stop a script's execution to look up some of it's variables? I wonder if I can use the Pythonic practice of inserting: assert 0, (foo, bar) to debug scripts in a debuger-less way? ...

Linux: How to debug a SIGSEGV? How do I trace the error source?

Hello! My firefox started crashing since today. I haven't changed anything on the system or on firefox config. I use strace -ff -o dumpfile.txt firefox to trace the problem. It's not a big help. I see the segfault, in two of the generated process dumps, but how I can trace them to their cause? After running for 10 seconds and crashin...

Can't step into iterator block whilst debugging (C#)

I'm trying to debug my code which is being executed from a unit test project, but when I try to step into a method, it just passes straight onto the next line and the breakpoint inside that method isn't hit. The method is on a class which is in a different project, but all the code is built in debug mode and I've tried cleaning and rebui...

Profiling C++ with Google Perf tools and Dynamic Libraries

I'm trying to profile a C++ application, that I did not write, to get a sense for where the major computation points are. I'm not a C++ expert and even less so C++ debugging/profiling expert. I believe I am running into a (common?) problem with dynamic libraries. I compile link to Google CPU Profiler using (OS X, G++): env LIBS=-lpro...

Why doesn't WinHTTP work while debugging?

I am using WinHTTP (WinAPI interface) in a C program. When I'm running the relase build from outside the ide (that is, without any debugger. IDE is VS2008) it works fine. However, if I run it inside the debugger (either the release or the debug build), or if I run the debug build from outside, WinHTTP won't work right. The status callb...

WinDbg using known module

I am debugging some Windows APIs and stack trace shows Unloaded_hext.dll. I am not able to find this DLL. Even if there are no symbols, WinDbg outputs this DLL name. Process monitor is unable to find this dll. Why is 'unloaded' prefixed? Is this done by WinDbg or are there any tricks? On running the lm command, I could see hext.dll in ...

Using Twitter as a mechanism to remote control applications?

I was brainstorming interesting usages of Twitter and came up with the following: An application can use it as a call home mechanism An application that has an invalid license could broadcast its location A software company could use it as a remote shell like interface and issue commands to shutdown, restart and to publish patches An a...

Eclipse SWING app: breakpoint hit only after an uncaught exception is thrown

I have a really strange issue. I am working on a Java SWING application in Eclipse. I set a breakpoint somewhere in my code, then run the debug. I execute the piece of code containing the breakpoint but it is always skipped. As soon as I run some code that throws an uncaught exception, the breakpoints start being hit again, without cha...

Eclipse 3.4+ - No more notifying a breakpoint in taskbar

Hello. This question may sound silly, but I was wondering if someone ever had that problem too. I was using Eclipse 3.2 to develop, earlier. Recently I changed to Eclipse 3.4 (ganymede), and I have a problem, concerning debugging. Before, whenever the debugger was hitting a breakpoint, Eclipse would blink in the windows taskbar, to noti...

Debugging with NUnit

I'm using NUnit for my unit tests and I have my unit test class library project setup so that Visual Studio launches the NUnit gui when I press F5. This lets me set breakpoints in my tests and look at the contents of variables, etc. What isn't happening though is that if one of my tests crashes (throws an exception) Visual Studio does ...