Questions tagged [trace]

A trace is a log of execution of a process or method.

A trace is a log of execution of a process or method.

It is typically used during debugging in order to provide information to show the actions taken by code.

2716 questions
45
votes
6 answers

Is there a way to turn on tracing in perl (equivalent to bash -x)?

I have a system script in perl. I need some equivalent of bash -x to determine what is going wrong with the script. Is there something equivalent? EDIT: What bash -x does is that it prints each line as it is evaluated. This makes debugging code that…
Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
45
votes
3 answers

How can I make Perl and Python print each line of the program being executed?

I know that bash -x script.sh will execute script printing each line before actual execution. How to make Perl and Python interpreters do the same?
Vi.
  • 37,014
  • 18
  • 93
  • 148
41
votes
9 answers

How to get Javascript Function Calls/Trace at Runtime

As I interact with my AJAX based application at RUNTIME I'd like the console to spit out all the functions it's calling. (so no stack trace, or breakpoints, or profiling or anything) So for example, let's say I pressed a button on the page. I'd like…
Shai UI
  • 50,568
  • 73
  • 204
  • 309
40
votes
4 answers

How to save websocket frames in Chrome

I am logging websocket traffic using Chrome/Developer Tools. I have no problem to view the websocket frames in network "Frames" window, but I can not save all frames (content enc. as JSON) in an external (text) file. I have already tried save as HAR…
AlterSchwede
  • 463
  • 1
  • 5
  • 9
36
votes
5 answers

How to PRINT a message from SQL CLR function?

Is there an equivalent of PRINT 'hello world' which can be called from CLR (C#) code? I'm trying to output some debug information in my function. I can't run the VS debugger because this is a remote server. Thanks!
Serguei
  • 2,910
  • 3
  • 24
  • 34
36
votes
6 answers

How to run a PowerShell script with verbose output?

I'm wondering if there's a way to run a PowerShell script such that both the commands and the output of each line of the script are printed. For example, in Bash you would write bash -x myscript or place a set -x at the top of your script. In Batch,…
James Ko
  • 32,215
  • 30
  • 128
  • 239
35
votes
5 answers

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: { …
Till
  • 27,559
  • 13
  • 88
  • 122
34
votes
10 answers

Xdebug trace GUI?

I'm trying to find a GUI to parse and view Xdebug trace files. Although you can make them human readable, the sheer number of lines makes it unusable. I'm looking for something like KCachegrind but for a trace file. My main goal behind all this is…
nolanpro
  • 2,257
  • 3
  • 23
  • 23
33
votes
8 answers

In EF 4.1 DbContext how to trace generated SQL

I wonder how to trace generated SQL like DataContext in LinqToSql. I also read articles about the solution of EFProviderWrapper on Jaroslaw Kowalski's blog, but it is based on ObjectContext, does not work for DbContext. Anyone know how to do this…
Chance
  • 1,317
  • 2
  • 12
  • 18
33
votes
4 answers

Linux - How to track all files accessed by a process?

Is there a way to track all file I/O for a given process? All I really need is the locations of files being read from/written to from a given process (and ideally if it was a read or write operation although that's not as important). I can run the…
Tom B
  • 2,735
  • 2
  • 24
  • 30
32
votes
6 answers

Add Timestamp to Trace.WriteLine()

In my C# .NET application I have an issue with the Trace.WriteLine()-method. I uses this method alot, and want to add a TimeStamp every time I use it. Instead of Trace.WriteLine(DateTime.Now + " Something wrong!"), is there a solution where the…
Soren Mikkelsen
32
votes
3 answers

How to trace every method called

I have an existing project where I would like to find out all calls being made and maybe dump into a log file. I had a look at this thread, but didnt help much. I tried PostSharp, and the example shows how to achieve it. But I need to add an…
ShaQ.Blogs
  • 1,264
  • 4
  • 17
  • 30
30
votes
6 answers

How can I add a Trace() to every method call in C#?

I am having a hard time tracking down a lock issue, so I would like to log every method call's entry and exit. I've done this before with C++ without having to add code to every method. Is this possible with C#?
Jon Tackabury
  • 47,710
  • 52
  • 130
  • 168
28
votes
6 answers

How do I stop the Visual Studio Output window displaying the logger name of log4net output?

I am using log4net DebugAppender (or TraceAppender). I have configured the appender like this:
James World
  • 29,019
  • 9
  • 86
  • 120
28
votes
4 answers

How to make DebugView work under .NET 4?

SysInternals' DebugView no longer works if used under .NET 4. Some research indicated that the new architecture of the framework did not allow for traces to be captured if a debugger was attached; in my case it's the Visual Studio debugger. Changing…
SoManyGoblins
  • 5,605
  • 8
  • 45
  • 65