debugging

[net]how to inject debugging code to an assembly?

Given an assembly with an entry point like: int FooClass::doFoo(int x, double y) { int ret; // Do some foo return ret; } Is it possible to use yet another assembly to simulate something like: int FooClass::doFoo(int x, double y) { int ret; TRACE_PARAM_INT(x) TRACE_PARAM_DOUBLE(y) // Do some foo TRACE_RETURN_IN...

How can I resume a process after calling DebugActiveProcess?

I am using this DebugActiveProcess to debug an already running process. http://msdn.microsoft.com/en-us/library/ms233510.aspx Right after calling the method, the debugee is suspended. How can I resume it ? I tried ICorDebugProcess.Continue, no effect. I also tried the managed debugger sample (mdbg). Same behavior: "at" suspends the pr...

Is there any way to know what property/field contains some value?

When I am in debug and I am dealing with some legacy code or some framework sometimes I need to get the property that contains a particular value. For example I know I put 153 on UI and I need to know where is it after I put it there. This will help to understand lot of things about this framework. That`s a one usage, the question is how...

Starting debugging with DDD

I would like to use DDD to debug the source code of Gedit and GTK+. I start DDD by command ddd gedit. Now I can run the project and I found the source window but I can't see the sources of Gedit and GTK+ nor run the program line by line. How to do that? ...

iPhone Exception Handling

I have one crash in my iPhone application that does throw an NSException. The crash reports are completely ambiguous in where the error is and what exactly is causing it. Is there a smart way for me to set a top level exception handler somewhere to see what is causing it? I can't replicate the problem myself, but a few of my beta users c...

Visual Studio debugging execution path.

I have c code like. FILE * fin = fopen("myfile", "rb"); if (fin == NULL) { printf("file myfile does not exist, closing"); return false; } It works when compiled, but not in debugging mode (stepping trough) where it return false. checking argv[0] is ok and absolute paths are working both ways. ...

Debugging multi-threaded Python with Wing IDE

I'm debugging a multi-threaded Python program with Wing IDE. When I press the pause button, it pauses only one thread. I've tried it ten times and it always pauses the same thread, in my case called "ThreadTimer Thread", while the other threads keep on running. I want to pause these other threads so I could step with them. How do I do t...

Visual C++ class testing

Is there any way to easily test C++ classes in java way. In java you can add static function main and run it directly from IDE class Foo{ ... public static void main(String args[]) { System.out.println("Test class foo here"); } } is it possible to do it in Visual C++ ? Of course you can create another project, but it ...

Meditative Aspect of Programming

Does anyone think that coding can be integrated in some way with the philosophies of meditation and yoga where there is a strong focus on breathing properly and keeping your mind focused and being very aware? It seems like a lot of time when I'm coding there are several psychological barriers for me like being irritated when I might for...

Any approach to peek memory data structure of C/CPP application?

... like how many memory consumed by what / how many objects, as in JVM heap dump file. Our service process is consuming remarkable memory, which is being complained by others living in a same OS. The applications structure is weird, it leveraged reverse JNI to call java interface from c++ code, also it's a network application, all thes...

Debugging Question - VS 2008 web services on Cassini

I'm testing a web service in Visual Studio, and stepping through using the debugger. Then I click stop debugging. This stops the debugging session, but the program continues to run like a runaway train. Is this a "bug" or a "feature" of Visual Studio 2008? If it's a feature, how can I tell Visual Studio to halt execution when I click...

C: Debugging options for gcc environments

Hi, I just started learning C, and I am looking for a simple tool for debugging in gcc environment. Such tool would print a stack trace, and indicate where a segmentation fault occurs. ...

Attach child process to debugger automatically

If the main process is currently being debugged in Visual Studio, how can I have it so any new processes it spawns are also attached to the same instance of Visual Studio as the main process is? Currently the new processes are created just with a CreateProcess call, however I can add extra code or use a different API altogether if neede...

Debugging the server side of an XML RPC call using Zend Studio and/or xDebug

I'm consuming an XML RPC service using PHP. The Server is also PHP and for development purposes it's running here on my local machine. I'd love to be able to step thru the XML RPC server code. Is there any way to do this? Logically I didn't think it would work, but just for kicks I tried setting breakpoints in the Server code and the...

How do I attach a trace listener to a running process?

I'm not sure if this is possible in the manner I am envisioning or not so I'm hoping someone can help me wrap my head around this. I'm wanting to inject a TraceListener into a running process - kind of. I don't actually care how I attach to the process, but the end goal is to listen to the trace output of the running process and dump i...

Strange execution errors in application

I've got a unit test I'm writing which seems to have some kind of a pointer problem. Basically, it's testing a class that, once constructed, returns information about a file. If all the files expected are detected, then the test operates correctly. If there are more files expected than detected, then the routine correctly reports error. ...

xcode debugging maximum depth for investigating variables?

Hey There! I use Xcode to code for a current iPhone Project. It's the first time i work with XCode. What i wonder is, whether i need to set somewhere how 'deep' i can be able to recursively look into the variables in the debugger. If i have the debugger open, i can see all the current variables and open them. I can see all the fields o...

How to debug vs 2008 c# express dll which is called by a vb6/vba app?

Hi guys, i have a c# dll which is written to act as a wrapper to grab data from a data source and pass it to a vba/powerpoint ppa application. i don't have much experience with vba which is why i'm simulating this using vb6 which i know a tiny bit more about. i'm having enough problem as of now trying to understand the syntax and what...

How to know if debug version of flash is installed?

How to know if debug version of flash is installed? Thank you. ...

Debug dynamically loaded assembly in Visual Studio .NET

Hello, I am using C# and reflection to load and invoke methods from an assembly. I have the source code of the assembly itself. What do I need to do to get the debugger to step into (and not over) the code of the dynamically loaded assembly ? If I press F11 on the ....Invoke line it just steps over it .. Thanks ...