Version 6 (modified by Charles, 13 years ago) |
---|
Example:
cobra -er -dst myprogram.cobra
In a nutshell, when the program throws an uncaught exception, an HTML report will be generated which includes the stacktrace, the objects on the stack trace and their properties. This can be really useful for inspecting the state of a program. You can even force it like so:
assert false, {'customer': customer, 'product': product}
From cobra -h:
-exception-report[:no|yes]
-exc-rpt, -er
Turn on an informative HTML report that will be generated if the program throws an uncaught exception. Also, see ObjectExplorer-WinForms.cobra and its doc string for an alternative, GUI approach.
-detailed-stack-trace[:no|yes]
-dst
Enable a detailed stack trace which gives great postmortem information for uncaught exceptions, but slows execution. Also, detects stack overflow which is needed for Mono but not .NET which already does this. Works in combination with -exception-report, or see ObjectExplorer-WinForms.cobra and its doc string for ideas on how to present this information graphically.
For interactive browsing and inspection of objects, see ObjectExplorer.
There is a performance overhead for -detailed-stack-trace/-dst, so this option is typically used only for troubleshooting.
See also: StackOverflow, DebuggingSansDebugger, DebuggingTopics