How to debug for reporting: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
Line 31: Line 31:
==On Microsoft Windows==
==On Microsoft Windows==


I've not tried it, but this [[http://hamsterrepublic.com/ohrrpgce/index.php/GDB_on_Windows.html howto]] explains how to run gdb under Microsoft Windows.
I've not tried it, but this [http://hamsterrepublic.com/ohrrpgce/index.php/GDB_on_Windows.html How-to] explains how to run gdb under Microsoft Windows.


Can anybody try it out and, eventually, report here if it works?
Can anybody try it out and, eventually, report here if it works?

Revision as of 15:05, 25 November 2009

This article is part of the HOWTOs series.
Installation Usage PDF issues Imposition Other

Introduction

When you file a bug about a crash, most of the time it is very helpfull, if you can attach a backtrace from a debugger.

This Howto tells you how to get these informations.

On Linux

If the crash happens on a Linux machine (or generally on a unix machine with the GNU gcc compiler) you can use gdb.

You have to first load scribus in a new gdb session and launch scribus from there. After scribus has crashed you automatically get some details about the error occured. You can get a full report with the command bt (backtrace).

$ gdb scribus
(gdb) run
... error reporting ...
(gdb) bt
... full backtracking informations
(gdb) exit
$

If you compile yourself scribus -- and you plan to report bugs -- you should enable the debugging at compile time:

  • if you use the autotools (configure; make; make install) you can do it at configure time: $configure --enable-debug
  • if you use CMake (cmake; make; make install) , you should add -DWANT_DEBUG=1 to your cmake line, e.g.:
 cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs -DWANT_CAIRO=1 -DWANT_DEBUG=1

On Microsoft Windows

I've not tried it, but this How-to explains how to run gdb under Microsoft Windows.

Can anybody try it out and, eventually, report here if it works?