How to get the exception shown in WinDBG via CLRMD - windbg

When i open a crash dump (mini dump) via WinDBG it usually points to a particular call stack and exception. Likewise when i open it in Visual Studio (it also automatically selects the correct thread where the exception originated). In CLRMD i can inspect each thread's stack trace/exception but how do i know which thread was active at the time/what was the last exception to occur?

Related

Debug plug-in in eclipse

I am trying to create a debug plug-in in eclipse. I need to get the exceptions thrown by the currently run program. Can anyone please help me to achieve this. The requirement is to get the entire exceptions, ie, the entire stack trace string. The problem currently is that the program already run contains errors and the exception may or may not be caught using try catch handlers. ie,the program containing error is out of our control. We need to extract the error caused by the already run program inside the plug in code. Can anyone give some suggestions.

How to view the current exception when breaking on exceptions in Chrome?

When debugging with Chrome's developer tools one can enable breakpoints for all exceptions (or only uncaught ones). How does one view the current exception details when an exception is thrown?
In the devtools Scope Variables panel you can find <exception>, which will contain the exception details. The callstack for the exception is visible in the Call Stack panel.

eclipse - class find editor - source not find

I have a problem with eclipse debugging. I had a proper working code and few hours ago I add one more external library to do something new. When I run the program now it works properly, but when I want to debug it, it stopped on the first line of a new part of the code (the one using the newest external library). It shows the info:
"Class File Editor
Source not found
The source attachment does not contain the source for the file ModelBuilder.class"
When I try to step over I just receive the same information but connected with other files. After stepping over a multiple times I finally get back to my code and can debug the rest of the program normally.
Of course I can do it always but does anybody know the solution to that problem, not to click step over multiple times but debug normally?
It should not enter the external library code unless you step into it, or there's an exception in that code. If you find yourself stepping through code you don't have source to, use Step Return, which jumps to the end of whatever method you're in.
If it is caused by an exception in the library code and you want to ignore it, go to Window > Preferences > Java > Debug and uncheck "Suspend execution on uncaught exceptions".
If you know what exception is causing the execution to suspend, then you could also try this:
Go to the Debug perspective
Open the Breakpoints view
Click the J with the exclamation point by it (J!)
Search for the exception that triggers the debug suspend
Uncheck the two check boxes
Say OK

iPhone - Debugging EXC_BAD_ACCESS crashes

From times to times, while debugging an Application, I see this error on Xcode:
Program received signal: “EXC_BAD_ACCESS”.
and the debugger does not stop on the problematic line. In fact the debugger just shows me a page with a bunch assembly language code and that's it.
I have to have paranormal powers to figure out where the exact problem is.
Is there a way to force Xcode to give me more "nutritive" error messages – that can detail the problem – and stop on the offending line when such errors occur?
thanks for any help.
When the crash happens, open the Debugger in Xcode (Run -> Debugger). There should be 3 to 4 panes like this:
http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeDebugging/art/debugger_disassembly.jpg
On the top-left pane (the "stack trace"), select the topmost row which is not gray.
(Note: Sometimes the stack trace can only find internal functions because of bad memory management triggered in the run loop. Try to Build -> Build and Analyze to eliminate all potential memory management bugs first.)
You can enable NSZombies see here and I've found a good way to see where the actual problem is, is to run and debug the program with the debugger open.
This way when the program stops executing it more often then shows the line that was executing when the program crashed.
I wrote up a blog that tells you how to use some compiler switches that help a lot in finding crashes that are the result of releasing objects before you are done with them.
http://loufranco.com/blog/files/debugging-memory-iphone.html
Build and Analyze is ok, but not as good as scan-build (which it is based on). Instructions for installing that are here:
http://loufranco.com/blog/files/scan-build-better-than-build-analyze.html

Program received signal EXC BAD ACCESS

I'm stuck with a problem in emulator. The emulator occasionally stops with
Program received signal: "EXC_BAD_ACCESS" .
as console output. No further info provided. Is there a chance to come closer to the problem?
I see that NSZombie already has been proposed, but the link doesn't seem to work anymore, so here's instructions on how to use it.
To activate NSZombie do the following:
Get info of the executable.
Go to the arguments tab.
In the "Variables to be set in the environment:" section add:
Name: NSZombieEnabled
Value: YES
Then run your app as usual and when it crashes it should tell you which deallocated object received the release message.
This often is caused by sending a message to an object that is no longer in memory. There is no error message because there is nothing on the stack when the error occurs. You can set breakpoints and step through your application until you find where the crash occurs, or you can use nszombie.
http://howtomakeiphoneapps.com/2009/02/nszombie-and-xcode-oh-my/