Good debugger tutorial for beginners
I'd suggest the following tutorial for Visual Studio 2010 to start with. It contains information about call stack, debugging multithreaded program and other things which may be needed. The express edition of Visual Studio 2010 is available for free and AFAIK its debugger has precisely the same features as commercial editions.
Debugger creation tutorial
Writing a debugger is no trivial task and it requires intimate knowledge both in the underlying platform you're working with and the language you're writing a debugger for.
Some articles I've came across in the past I found particular helpful on the subject:
- Eli Bendersky's "How debuggers work". I found this to be pretty helpful thanks to its thoroughness. He covers all the important parts of what a debugger does, how it works and how it accomplishes this under the hood. He even covers quite a bit on using dwarf debug format to help annotate a debug session, a subject matter that's hard to come by given its lack of accessible documentation. Even though he covers this in a *nix-like platform, many of the concepts he describes are still just as applicable under Windows.
- DebugInfo.com DEBUGGING API EXAMPLES. If you're intending to work on win32 platform then you'll find the examples here useful. This one shows actual examples of how you can use the win32 debugging api to create a process that can "act" like a debugger. It contains examples on how to launch the debuggee or attach to a running process and handling debug events generated from the debug api.
- MobDebug. This is a remote lua debugger implemented in pure lua in ~1.4kloc. This complement's deivid's answer on the ruby debugger. Many times it's helpful to see an actual implementation of a debugger even if it isn't for a low level language. This may be an easier place to start to get an overall view of what the debugger has to do without getting bogged down with all the lower level details you'll have to deal with in a "bare-metal" language.
- pydbg. A windows debugger written in python using the debugging API below.
- jewdbg. Another windows debugger written in python. A bit smaller than pydbg and not as feature rounded but great if you're looking for an example implementation to learn from.
- MSDN Debugging API. Primary reference & documentation for the basic debugging primitives and building blocks provided by windows. If developing your own debugger for windows you'll need many of the things provided here.
Where is there a good tutorial on how to use Xcode's debugger properly?
The crash is inside Apple's code (that's why debugger doesn't show you the source) and cause of it is actually somewhere else – you've released a temporary object that was supposed to be released by autorelease pool. This caused autorelease pool to crash.
You're supposed to release only objects which:
- you've retained yourself using
retain
- were returned by
init
,copy
andnew
methods only (and their variants containing these words)
Unfortunately you can't learn that one from the debugger, only from documentation and experience…
You can use Clang Analyzer to find such errors (sometimes).
Any tips for a newbie who wants to find a good debugger for C++?
If you are having troubles with the UI of GDB, try DDD. It is a graphical front-end for debuggers like GDB, and has quite a number of nice features. You can see a sample session of it here.
Any good debug tutorial for React.js
It's difficult to describe a general strategy to debug "a lot error shown up" so I will walk you through the process for debugging component level errors:
Install the React dev tools extension for your browser of choice:
- Chrome
- Firefox
Find the component
I recommend either of these paths:
2.a. Open
React tab
from your browser dev tools and type in the bottom search bar to lookup components by name.2.b. Open
Elements tab
, select some element, and switch back toReact
. The component hierarchy will be expanded up until the React component matching the DOM node you selected inElements
.Inspect the state and props of the component that is behaving incorrectly.
If for some reason you don't like installing browser extensions, you can throw one or more debugger;
statements to set breakpoints that will "pause" the execution of your app and let you inspect the call stack, scope, and errors at these points.
XCode 4 - IPhone Dev - Good Debug Tutorial
Andy, this first is about super basic debugging: http://mobile.tutsplus.com/tutorials/iphone/xcode-debugging_iphone-sdk/
And here you can find two excellent tutorials:
http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1
http://www.raywenderlich.com/10505/my-app-crashed-now-what-part-2
good tutorial on using ruby-debug to switch threads in a ruby program
The RubyMine IDE has good process debugging and it's pretty intuitive. I'm going to use that.
Here's a quickstart guide they give you
http://www.jetbrains.com/ruby/quickstart/
Chrome Developer Tools: Best resource for learning advanced features?
Addy Osmani did an excellent series on the chrome dev tools, you can find some of it here. I think that if you read it (and watch the videos), I've found them very useful, if you read them, you're pretty much covered. I included some additional useful resources.
Addy Osmani Tutorials and videos:
- Easy memory profiling using the chrome dev tools
- Visually re-engineering css for faster paint times
- The Breakpoint - Chrome dev tools (Youtube video)
- The Breakpoint Ep2 (Youtube video with Paul Irish)
- The Breakpoint Ep3 (Youtube video, source maps)
- Chrome devtools course by TutsPlus (subscription required)
Official:
- Developer tools official guide by Google
- Google video tutorials on the developer tools by Google
- Profiling JavaScript by Google
Other:
- Nettuts series , fairly basic but nicely put.
- A re-introduction to the dev tools by Paul Irish
- Smashing Magazine also did an article on profiling, but it's fairly basic compared to the Addy Osmani stuff.
Peter's GDB Tutorial
Looks like Peter's GDB tutorial is now available on Peter Jay Salzman's website. Not sure why it was down when this question was posed in December '09.
Related Topics
Find All Substring's Occurrences and Locations
Passing Rvalues Through Std::Bind
Expand File Names That Have Environment Variables in Their Path
How to Return Numpy.Array from Boost::Python
Inferring the Call Signature of a Lambda or Arbitrary Callable for "Make_Function"
Fast Color Quantization in Opencv
How to Create the Cartesian Product of a Type List
Cancelling Boost Asio Deadline Timer Safely
Initial Capacity of Vector in C++
Declare a Reference and Initialize Later
I Want to Convert Std::String into a Const Wchar_T *
Identifier Not Found Error on Function Call
Do All Pointers Have the Same Size in C++
Most Efficient/Elegant Way to Clip a Number
Std::To_String - More Than Instance of Overloaded Function Matches the Argument List