trace

How to trace T-SQL function calls

杀马特。学长 韩版系。学妹 提交于 2019-11-28 23:06:18
I'm trying to debug a rather complicated formula evaluator written in T-SQL UDFs (don't ask) that recursively (but indirectly through an intermediate function) calls itself, blah, blah. And, of course, we have a bug. Now, using PRINT statements (that can then be read from ADO.NET by implementing a handler for the InfoMessage event), I can simulate a trace for stored procedures. Doing the same for UDF results in a compile time message: Invalid use of side-effecting or time-dependent operator in 'PRINT' within a function. I get the message (PRINT does some stuff like resetting @@ROWCOUNT which

How to debug JAVASCRIPT events? Or how to make all functions call trace?

馋奶兔 提交于 2019-11-28 21:15:40
问题 For example there is a button. It is wrapped by <div> . When pressing to this button, there is javascript function call happen, then another function, then calling by ajax to the server and if it's OK, javascript redirecting this page to another page. It's hard to debug. Is it possible to "catch" this event ? I.e. to know, what function is called after the click on the button? Button doesn't have attribute "onclick" i.e. event listener is connected in javascript. And if it's not possible then

Overriding System.Diagnostics.Trace.WriteLine to log to a file

偶尔善良 提交于 2019-11-28 18:26:52
This may be more of an OOP concept question, but here's what I'd like to do. I have an application that outputs debug information using System.Diagnostics.Trace.WriteLine so it can be viewed with DebugView. I'd like to override/extend (not sure of the proper terminology) this method to log the text to a file instead, or maybe in addition to the Trace output. This would allow me to write a new WriteLine method for my app, and I could leave all my other System.Diagnostics.Trace.WriteLine statements unchanged throughout the rest of the application. So how would I go about changing the behavior of

Xdebug trace GUI? [closed]

被刻印的时光 ゝ 提交于 2019-11-28 18:13:58
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 to find what the memory hogs are. I found this to be pretty solid. Maybe it's serviceable to you, too: https://github.com/corretge/xdebug-trace-gui vdrmrt I found this one: xdebug trace file parser . I just using started xdebug today came across this problem a few ahours ago too. I'd love a cachegrind style gui for xdebug traces. A lot of the lower

NSNotificationCenter trapping and tracing all NSNotifications

℡╲_俬逩灬. 提交于 2019-11-28 15:35:54
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(traceNotifications:) name:nil object:nil]; [...] } - (void)traceNotifications:(NSNotification *)notification { NSLog(@"received notification %@", [notification name]); } I do actually get a number of notifications that way. But at some point the application does crash. The

log4net versus TraceSource [closed]

两盒软妹~` 提交于 2019-11-28 15:25:00
In this thread many people have indicated that they use log4net. I am a fan of TraceSources and would like to know why log4net is used. Here is why I like trace sources: Pluggable listeners - XML, TextFile, Console, EventLog, roll your own Customisable trace switches (error, warning, info, verbose, start, end, custom) Customisable configuration The Logging Application Block is just a big set of TraceListeners Correlation of activities/scopes (e.g., associate all logs within an ASP.NET request with a given customer The Service Trace Viewer allows you to visualize events against these activities

VB6 Debugging - compiled

六眼飞鱼酱① 提交于 2019-11-28 14:40:58
My scenario is I'm supporting a VB6 app at the place I work and in the last few weeks it has started crashing more often than it ever used to. It uses both a local Access MDB database and a remote SQL Server DB for different types of storage. The good news is we are writing a replacement app, the band news I need to support this one in the meantime and the vendor is long gone from this world. What are some ways I could try and diagnose what is causing the crash? For example so far I've tried ODBC tracing (For the MDB component), SQL Profiler tracing and ProcMon on a client PC. Is there

How to track the execution process of ruby program

与世无争的帅哥 提交于 2019-11-28 13:50:30
I am new to ruby and I want to track the execution process of ruby program when I feel confused about some programs. I wonder whether there is a way to help me track just as shell scripts set -x do? PS: Such as shell script test.sh: set -x ls /home echo "hello dujun and haotianma!" when I execute test.sh, then the output will be like: + ls /home dujun haotianma + echo 'hello dujun and haotianma!' hello dujun and haotianma! Just as how this bash script echos each statement before executing it, I want to make a Ruby program show which statements are executing. I think you can use the Ruby's

Extracting data used to make a smooth plot in mgcv

泄露秘密 提交于 2019-11-28 09:56:12
This thread from a couple of years ago describes how to extract data used to plot the smooth components of a fitted gam model. It works, but only when there is one smooth variable. I've got more than one smooth variable, and unfortunately I can only extract the smooths from the last of the series. Here is an example: library(mgcv) a = rnorm(100) b = runif(100) y = a*b/(a+b) mod = gam(y~s(a)+s(b)) summary(mod) plotData <- list() trace(mgcv:::plot.gam, at=list(c(25,3,3,3)), #this gets you to the location where plot.gam calls plot.mgcv.smooth (see ?trace) #plot.mgcv.smooth is the function that

Counting machine instructions using gdb

旧城冷巷雨未停 提交于 2019-11-28 09:54:58
I need to estimate the exact starting location of some hotspot in a program, in terms of x86 machine instruction count (so that it can later be run in some emulator/simulator). Is there a way to use gdb to count the number of machine instructions being executed up to a breakpoint? There are other alternatives of course, I could use a emulation / binary instrumentation tool (like Pin), and track the run while counting instructions, but that would require installing this tool on every platform I work on - not always possible. I need some tool that's available on pretty much any linux machine.