Difference between revisions of "How to debug for reporting"

From Scribus Wiki
Jump to navigation Jump to search
m
Line 18: Line 18:
 
... error reporting ...
 
... error reporting ...
 
(gdb) bt
 
(gdb) bt
... full backtracking informations
+
... full backtracking information
 
(gdb) exit
 
(gdb) exit
 
$
 
$
Line 24: Line 24:
  
 
If you compile yourself scribus -- and you plan to report bugs -- you should enable the debugging at compile time:
 
If you compile yourself scribus -- and you plan to report bugs -- you should enable the debugging at compile time:
* if you use the autotools (<code>configure; make; make install</code>) you can do it at configure time: <code>$configure --enable-debug</code>
 
  
* if you [[Building_1.3.3.6cvs_or_1.3.4cvs_or_higher_with_CMake| use CMake]] (<code>cmake; make; make install</code>) , you should add '''-DWANT_DEBUG=1''' to your cmake line, e.g.:  
+
* With [[Building_1.3.3.6cvs_or_1.3.4cvs_or_higher_with_CMake| CMake]] (<code>cmake; make; make install</code>) , you should add '''-DWANT_DEBUG=1''' to your cmake line, e.g.:  
 
   cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus15svn -DWANT_DEBUG=1
 
   cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus15svn -DWANT_DEBUG=1
  

Revision as of 21:12, 24 March 2012


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 information
(gdb) exit
$

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

  • With CMake (cmake; make; make install) , you should add -DWANT_DEBUG=1 to your cmake line, e.g.:
 cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus15svn -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?