Debugging: Difference between revisions

From FreeCAD Documentation
m (Add Japanese to languages)
(added "how to generate a backtrace" for linux)
Line 9: Line 9:
;-v: With the "v" option FreeCAD gives a more verbose output.
;-v: With the "v" option FreeCAD gives a more verbose output.
;-l: With the "l" option FreeCAD writes additional information to a logfile.
;-l: With the "l" option FreeCAD writes additional information to a logfile.


== Generating a Backtrace ==
If you are running a version of FreeCAD from the bleeding edge of the development curve, it may "crash". You can help solve such problems by providing the developers with a "backtrace". To do this, you need to be running a "debug build" of the software. "Debug build" is a parameter that is set at compile time, so you'll either need to compile FreeCAD yourself, or obtain a pre-compiled "debug" version.

=== For Linux ===
Prerequisites:
software package gdb installed
a debug build of FreeCAD
a FreeCAD model that causes a crash

Steps:
Enter the following in your terminal window:
cd FreeCAD/bin
gdb FreeCAD
handle SIG33 noprint nostop
run

FreeCAD will now start up. Perform the steps that cause FreeCAD to crash, then enter 'bt' in your terminal window. This will generate a lengthy listing of exactly what the program was doing when it crash. Include this with your problem report.


{{Docnav|Module Creation|Testing}}
{{Docnav|Module Creation|Testing}}

Revision as of 12:23, 7 May 2014

Test first

Before you go through the pain off debugging use the test framework to check if the standard tests work properly. If not there is maybe a broken installation.


command line

The debugging of FreeCAD is supported by a few internal mechanisms. The command line version of FreeCAD provides to options for debugging support:

-v
With the "v" option FreeCAD gives a more verbose output.
-l
With the "l" option FreeCAD writes additional information to a logfile.


Generating a Backtrace

If you are running a version of FreeCAD from the bleeding edge of the development curve, it may "crash". You can help solve such problems by providing the developers with a "backtrace". To do this, you need to be running a "debug build" of the software. "Debug build" is a parameter that is set at compile time, so you'll either need to compile FreeCAD yourself, or obtain a pre-compiled "debug" version.

For Linux

Prerequisites:

   software package gdb installed
   a debug build of FreeCAD
   a FreeCAD model that causes a crash

Steps: Enter the following in your terminal window:

cd FreeCAD/bin
gdb FreeCAD
handle SIG33 noprint nostop
run

FreeCAD will now start up. Perform the steps that cause FreeCAD to crash, then enter 'bt' in your terminal window. This will generate a lengthy listing of exactly what the program was doing when it crash. Include this with your problem report.

Module Creation
Testing
Available translations of this page: Template:Jp Template:Se