debugging

Visual Studio 2005 says I don't have permission to debug?

I am new to visual studio/asp.net so please bear with me. Using vs 2005 and asp.net 3.5. I have vs installed on the production server. If I set the start option for the site to "use default web server" when I go to debug my website vs tries to open the site at http://localhost:4579/project and returns 404. If I set start option to "us...

How do I set specific environment variables when debugging in Visual Studio?

On a class library project, I set the "Start Action" on the Debug tab of the project properties to "Start external program" (NUnit in this case). I want to set an environment variable in the environment this program is started in. How do I do that? (Is it even possible?) EDIT: It's an environment variable that influences all .NET apps ...

Triggering a .NET garbage collection externally

Is there a way to trigger a garbage collection in a .NET process from another process or from inside WinDBG? There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and AQTime seems to have button that suggests it does this, but I can't find any documentation on how to do it. ...

The best way to start working on other people's code

I'm looking into adding some features to an open source packages and I would like to know your advices, experiences at "getting into" other people's code. I obviously already did the following, reading the most relevant part of the code, step debugging, having a good knowledge of the data* processed , generated documentation & graph thr...

Check if application was started from within Visual Studio

I am working on an application that installs a system wide keyboard hook. I do not want to install this hook when I am running a debug build from inside the visual studio (or else it would hang the studio and eventually the system), and I can avoid this by checking if the DEBUG symbol is defined. However, when I debug the release versio...

JavaScript Debugger

Does anyone know of a really good editor to debug JavaScript (other then Visual Studio 2008 and FireBug)? ...

Identify the host from a Windows user mode dump file

Is the an easy way of finding out the host name of a machine than generated a user mode dump file via WinDbg? Or at least any piece of identifying information to try and confirm that two dump files came from the same system. ...

How can I get full string value of variable in VC6 watch window?

I'm wanting to get the full value of a char[] variable in the VC6 watch window, but it only shows a truncated version. I can copy the value from a debug memory window, but that contains mixed lines of hex and string values. Surely there is a better way?? ...

Callstack that has has AV reported I see FunctionName() + some Hex value?

What is this offset hex value? ...

How do you troubleshoot WPF UI problems?

I'm working on a WPF application that sometimes exhibits odd problems and appears to hang in the UI. It is inconsistent, it happens in different pages, but it happens often enough that it is a big problem. I should mention that it is not a true hang as described below. My first thought was that the animations of some buttons was the p...

How can I use debugbreak() in C#?

What is the syntax and which namespace/class needs to be imported? Give me sample code if possible. It would be of great help. ...

What is the best way to inspect STL containers in Visual Studio debugging?

If I have a std::vector or std::map variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging (VS2003/2005/2008)? ...

How do you resolve crashing Windbg Logger on Vista?

I would like to use the Logger tool that ships with the Microsoft Debugging Tools for Windows. However, on Vista it crashes even with built-in Vista applications: > logger calc or > logger notepad The issue occurs if I run the tool from a command prompt with or without administrator rights. I'm using version 3.01 (3/20/2008). T...

How can one grab a stack trace in C?

I know there's no standard C function to do this. I was wondering what are the techniques to to this on Windows and *nix? (Windows XP is my most important OS to do this on right now.) Thanks for the help! ...

how can I debug exe with soem switch flags from command prompt

for e.g from command prompt I need to launch the exe with some switch flags under debugger. How do I do it? This is an exe from c/c++ and built using VS2005 environment that I need debug. I pass some flags to this exe to perform some stuff. ...

VS/vb.net: How to get the instance used by a With statement in the immediate window

VB.Net has a the very handy "with" statement, but it also lets you use it on an unnamed variable, like this: With New FancyClass() .Level = "SuperSpiffy" .Style = Slimming .Execute() End With Is there a way to get at the "hidden" instance, so I can view it's properties in the Immeidate window? I doubt I'll get it in the w...

Is there a good general method for debugging C++ macros?

In general, I occasionally have a chain of nested macros with a few preprocessor conditional elements in their definitions. These can be painful to debug since it's hard to directly see the actual code being executed. A while ago I vaguely remember finding a compiler (gcc) flag to expand them, but I had trouble getting this to work in ...

Is there a way to debug Velocity templates in the traditional code debugging sense?

We make heavy use of Velocity in our web application. While it is easy to debug the Java side of things and ensure the Velocity Context is populated correctly, it would be extremely valuable to be able to step through the parsing of the VTL on the merge step, set breakpoints, etc. Are there any tools or IDEs/IDE plugins that would make...

How can I get source and variable values in ruby tracebacks?

Here's the last few frames of a typical Ruby on Rails traceback: And here are the last few frames of a typical Nevow traceback in Python: It's not just the web environment either, you can make similar comparisons between ipython and irb. How can I get more of these sorts of details in Ruby? ...

Can you use Reflector to get the source code of an app and then debug using that source code?

It seems like you could use a mashup of Relector and a Debugger to be able to debug any .NET app WITHOUT having the source code at all. Is this possible? Has anyone seen this before? ...