backtrace

How can I make Ruby rake display the full backtrace on uncaught exception

As you may know rake swallows the full backtrace on uncaught exception. If I want to have a full backtrace, I need to add the --trace option. I find this very annoying because some of my tasks take long time to run (up to 6 hours), when it crashes I don't have any debugging info. I need to run it again with the --trace. On top of that,...

Uncaught TypeError: Cannot read property 'length' of undefined [jQuery]

I have a plugin that access the length property on many elements. However, the javascript console points to line 12 of jquery.min.js. How can I backtrace to find which line of my plugin has null variable attempting to access length? ...

Trace a deadlock in Ruby

I use BrB to share a datasource for various worker processes in Ruby 1.9 that I fork with Process#fork like the following: Thread.abort_on_exception = true fork do puts "Initializing data source process... (PID: #{Process.pid})" data = DataSource.new(files) BrB::Service.start_service(:object => data, :verbose => false, :host => ...

No more gdb in XCode console when build for iPhone simulator

Usually I use gdb backtrace to debug my application, but recently I can no longer do it when testing on iPhone simulator. The blue gdb word stops being displayed on console, and nothing happens when I type "bt" or "backtrace". I can still build and debug properly on the device though. My XCode version is 3.2.3. Is there any way to manua...

A simple, uniform and portable way of including tracing and backtracing into a C program.

GNU libc's backtrace and In-circuit emulators/debuggers are not always available when porting code to a new platform, especially when the target is a micro C compiler such as for the Z80. (Typically a program bug would "just hang" somewhere, or crash the gadget.) Is there an alternative to the classic "wolf fencing" method of manually i...

Get variables in scope at each PHP backtrace level?

Is there a way to view the variables set in each stack frame in a backtrace? I can come pretty close with a combination of debug_backtrace(true) to get the objects, get_object_vars on each object to get $this vars, the args key in each backtrace frame, and get_defined_vars to get globals, but any temporary variables set within a function...

Can I make ruby display method parameter values in a backtrace?

Using MRI 1.9 When an exception is raised that causes a backtrace to be printed, it would often be immensely easier to debug if the backtrace showed the receiver and values of method parameters as well as the method name. Is there any way of doing this? Think about situations such as passing a nil deep into library code that wasn't ex...

Getting pointer to bottom of the call stack and resolving symbol by address (like dladdr) under Windows?

I want to implement an analog of backtrace utility under windows in order to add this information to exception for example. I need to capture return addresses and then translate it into symbols names. I'm aware of StackWalk64 and of StackWalker project but unfortunately it has several important drawbacks: It is known to be very slow ...

Obtaining line numbers for diagnostics when writing a scripting-language compiler?

I'm currently writing a scripting language compiler using LLVM that can compile to executable code and use a JIT too. The problem I have is to show line numbers in diagnostic messages. Here is some sample code which might be output by my backend (not exactly, but roughly) ; allocate three values. Two for the operands and one for the r...