trace

AS3 trace w/out newline

For diagnostic purposes, I want to print a matrix (an array of arrays). To do this with a loop means executing a trace command multiple times, whichto my understandingprecludes the possibility of printing multiple table cells to a single row. (When coding trace(x); trace(y);, a line break falls between x and y.) What can I do? ...

How to "debug" Haskell with printfs ?

Hi there, coming from the Ocaml community, I'm trying to learn a bit of Haskell. The transition goes quite well but I'm a bit confused with debugging. I used to put (lots of) "printf" in my ocaml code, to inspect some intermediate values, or as flag to see where the computation exactly failed. Since printf is an IO action, do I have to...

Not tracing WCF Service (diagnostics tracing)

I have a client (a Unit Test) that call to WCF Service (hosting in debug mode in Console application). I have an error in service but I dont know which. I need trace it, but not generate anything file svclog in client. any suggestions , any sample code works ? EDIT: I use logging EntLibrary 4.1. I think there are errors in configurati...

Trace in NUnit works only while debugging from Visual Studio

I want to display trace info into Text Output tab in NUnit GUI (ver. 2.5.7, target runtime 4.0): Trace.Listeners.Add(new ConsoleTraceListener()); Trace.WriteLine("Hello NUnit"); This works fine when I launch NUnit GUI from Visual Studio (2010) via Debug -> Start external application. But when from .nunit project file and console runn...

C/C++ Question about trace-programming techniques.

I have the following question and from a systems perspective want to know how to achieve this easily and efficiently. Given a task 'abc' that has been built with debug information and a global variable "TRACE" that is normally set to 0, I would like to print out to file 'log' the address of each function that is called between the time ...

How can I spawn a process on Windows and see which files it uses?

I would like to write a C++ function, on Microsoft Windows, that spawns a process and returns, in addition to the process's termination status, a list of all the files the process read or wrote. It should not require any cooperation from the spawned application. For example, if the program spawned is the Visual Studio C++ compiler, the ...

Trace unmanaged function calls at runtime?

Is it possible to generate a tree of function calls at runtime? I'd like to get a feel of what the program is calling. This is essentially the same as breaking at a particular location, stepping through each function, and recording down what the function names are. I have no performance constraints. I am using Visual Studio, but do not...

gdb: Meaning of tstart error "You can't do that when your target is `exec'"

I would like to record the value of a local variable, t, each time that the program reaches a certain line. Accordingly, I tried: (gdb) trace stoer_wagner_min_cut.hpp :197 Tracepoint 1 at 0x4123a0: file ./boost/graph/stoer_wagner_min_cut.hpp, line 197. (gdb) actions Enter actions for tracepoint 1, one per line. End with a line saying j...

how do you control the level of a trace listener in the config file

I'm trying to learn the built-in features of tracing. I can't figure out how to use the config to set the level (information, warn, error) that gets written to my listen. I have the default app.config with it . In my code, I use Trace.TraceInformation() and Trace.TraceError. All of the messages are written to my text file. I want to b...

Customize Trace Output

I'm using Trace in two of my projects, but I'm seeing different behavior in both: The first project is a console application that I will convert to a service (at which point I will eliminate the Console traces), and I'm adding two Trace listeners: Trace.Listeners.Add(new TextWriterTraceListener(someFileStream)); Trace.Listeners.Add(new...

NSNotificationCenter trapping and tracing all NSNotifications

For some better understanding on what happens “under the hood”, I would love to do a complete trace of any notifications happening within my application. Naïve as I am, the first thing I tried was registering like this: Somewhere in my app: { [...] [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(trac...

Eclipse Debugging Method Calls

I have two versions of a project that are intended to accomplish the same effect. One is an older implementation, while the second is an updated, modified, and (hopefully) enhanced version. The issue is that they are not giving identical outputs. Is there an option to have Eclipse print out a list of everything a program is doing such th...

Can Python be made to generate tracing similar to bash's set -x?

Is there a similar mechanism in Python, to the effect set -x has on bash? Here's some example output from bash in this mode: + for src in cpfs.c log.c popcnt.c ssse3_popcount.c blkcache.c context.c types.c device.c ++ my_mktemp blkcache.c.o +++ mktemp -t blkcache.c.o.2160.XXX ++ p=/tmp/blkcache.c.o.2160.IKA ++ test 0 -eq 0 ++ echo /tm...

Output controller Dianostics.Trace statements to a view page?

In Web Forms we were able to see out N-Tier System.Diagnostics trace statements at the bottom of a page because they effectively executed within the page lifecycle. In Mvc, I can find these trace statements using trace.axd and randomly searching the index, but I would really like my trace statements that execute inside my controller act...

ASP.NET Tracing "Begin Init" value larger than "End Render"

I'm trying to pinpoint an ASP.NET page performance issue and I'm running tracing. As Look at the value returned the "Begin Init" value larger than "End Render". Shouldn't the number of seconds increase for each event listed? Here is the output example: Category Message From First(s) From Last(s) aspx.page Begin PreInit aspx.page E...

What do you do with badly behaving 3rd party processes in Linux?

Anytime I have a badly behaving process (pegging CPU, or frozen, or otherwise acting strangely) I generally kill it, restart it and hope it doesn't happen again. If I wanted to explore/understand the problem (i.e. debug someone else's broken program as it's running) what are my options? I know (generally) of things like strace, lsof, d...

.NET tracing not working with Diagnostics.TraceSource, only Diagnostics.Trace

I’m trying to set up .NET tracing. I’m able to get basic tracing to work via System.Diagnostics.Trace, but for complicated reasons I have to activate tracing via System.Diagnostics.TraceSource objects (the new way of doing it, since .NET 2.0) rather than using System.Diagnostics.Trace. I've tried everything but it just doesn't want to ...

Debug Android.mk

Hello all, I am building Froyo, is it possible that during building, make/python can output the file and the command it is calling right now. For example, in one of the Android.mk, there is a line, says, echo build success. On the monitor it will show "build success", what I want is that in addition, it shows "Android.mk line 20: ech...

Output Debug and Trace Messages to Form

My problem is similar to one posed by Joel Coehoorn some time ago when he wanted to Redirect Trace Output to Console. In my case, I'd like to output to a ListView or TextBox or for that matter, any control which can accept text. For this purpose, I'd like to have a general purpose Trace/Debug listener which I can hook to in order to pro...

Using Console.Out.WriteLine vs Trace.WriteLine in nUnit either running in isolation or within reSharper or TeamCity

I vaguely remember reading "something" "somewhere" about using Trace.WriteLine over Console.Out.WriteLine in nUnit possibly in the context of reSharper or TeamCity but I cannot remember the details. Therefore the question is either in the context of nUnit running separately or within reSharper/TeamCity is there any benefit of using one ...