Difference between revisions of "Kexi/Debugging"

Jump to: navigation, search
(Enabling Kexi Debug GUI)
(Compiling the Debug GUI)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
*[http://techbase.kde.org/Development/Tutorials/Debugging KDE Debugging tutorials] (KDE Techbase)
 
*[http://techbase.kde.org/Development/Tutorials/Debugging KDE Debugging tutorials] (KDE Techbase)
 
*[http://techbase.kde.org/Development/FAQs/Debugging_FAQ KDE Debugging FAQ] (KDE Techbase)
 
*[http://techbase.kde.org/Development/FAQs/Debugging_FAQ KDE Debugging FAQ] (KDE Techbase)
 +
*[http://techbase.kde.org/Development/Tutorials/Using_Qt_Creator Qt Creator can be used too] (KDE Techbase)
  
 
==Kexi Debug GUI==
 
==Kexi Debug GUI==
Line 10: Line 11:
  
 
Currently supported features, each in own separate tool window:
 
Currently supported features, each in own separate tool window:
*Logging SQL commands that are sent by Kexi to the database backends. This helps to track history of commands, helps to understand what happens regarding communication between the application and backends. The order is chronological. The window is always visible, and can be just minimized.
+
*[[File:Kexi-2.9-debug-gui-sql.png|right|150px]]'''Logging SQL commands that are sent by Kexi to the database backends.''' This helps to track history of commands, helps to understand what happens regarding communication between the application and backends. The order is chronological. The window is always visible, and can be just minimized.<br/><br/><br/>
*Displaying definition of an active Kexi form in XML format. Definition of original form (last saved version) and current form (after modification) is presented, so changes can be compared. To display the window, in ''Form Design'' toolbar, click ''Show Form UI code'' or press ''Ctrl+U'' shortcut.
+
*[[File:Kexi-2.10-debug-gui-forms.png|right|150px]]'''Displaying definition of an active Kexi form in a XML format.''' Definition of original form (last saved version) and current form (after modification) is presented, so changes can be compared. To display the window, in ''Form Design'' toolbar, click ''Show Form UI code'' or press the ''Ctrl+U'' shortcut.<br/><br/><br/>
  
 
===Compiling the Debug GUI===
 
===Compiling the Debug GUI===
Line 18: Line 19:
 
  % ccmake .
 
  % ccmake .
  
Find the CALLIGRA_DEBUG_GUI variable. To do so press "/" key to search, type CALLIGRA_DEBUG_GUI, press Enter.
+
Find the CALLIGRADB_DEBUG_GUI variable. To do so press "/" key to search, type CALLIGRA_DEBUG_GUI, press Enter.
 
When you find it, if it's set to OFF, press enter to switch it to ON.
 
When you find it, if it's set to OFF, press enter to switch it to ON.
  
 
Similarly, find the KEXI_DEBUG_GUI variable and set it to ON.
 
Similarly, find the KEXI_DEBUG_GUI variable and set it to ON.
  
You need to reconfigure the project to apply changes. To do so, type "g" key and wait until the configuration step finishes and ccmake exists.
+
You need to reconfigure the project to apply changes. To do so, press "c" key and wait until the configuration step finishes. Then press "q" key to exist from ccmake.
  
Then compile Kexi using:
+
Now compile Kexi using:
  
 
  % make -j{NUMBER} install".
 
  % make -j{NUMBER} install".
Line 37: Line 38:
  
 
{{Note|The command ''kde4-config --localprefix'' returns general value of current local prefix for your user account, this is useful since you might have set a custom prefix as advertised in the [[Calligra/Building]] article. So for custom prefix it may be something like ''$HOME/kde4/inst/.kde4/'' rather than ''$HOME/.kde''.}}
 
{{Note|The command ''kde4-config --localprefix'' returns general value of current local prefix for your user account, this is useful since you might have set a custom prefix as advertised in the [[Calligra/Building]] article. So for custom prefix it may be something like ''$HOME/kde4/inst/.kde4/'' rather than ''$HOME/.kde''.}}
 
 
The file is in a simple INI format. Now find a ''[General]'' section, and ShowInternalDebugger setting within it. Change the section to ''true''. If the setting line is missing, insert it. The section would finally look like:
 
The file is in a simple INI format. Now find a ''[General]'' section, and ShowInternalDebugger setting within it. Change the section to ''true''. If the setting line is missing, insert it. The section would finally look like:
  
 
  [General]
 
  [General]
 
  ShowInternalDebugger=true
 
  ShowInternalDebugger=true

Latest revision as of 15:48, 26 April 2014

General

Common information collected by the KDE Community:

Kexi Debug GUI

Kexi Debug GUI is a graphical tool for tracking internals of running Kexi application.

Isn't debug to standard output enough? The Debug GUI is richer and easier to follow.

Currently supported features, each in own separate tool window:

  • Kexi-2.9-debug-gui-sql.png
    Logging SQL commands that are sent by Kexi to the database backends. This helps to track history of commands, helps to understand what happens regarding communication between the application and backends. The order is chronological. The window is always visible, and can be just minimized.


  • Kexi-2.10-debug-gui-forms.png
    Displaying definition of an active Kexi form in a XML format. Definition of original form (last saved version) and current form (after modification) is presented, so changes can be compared. To display the window, in Form Design toolbar, click Show Form UI code or press the Ctrl+U shortcut.


Compiling the Debug GUI

First, the tool has to be compiled. By default its compilation is disabled. To enable compilation, go to the builddir, then use the ccmake visual tool:

% ccmake .

Find the CALLIGRADB_DEBUG_GUI variable. To do so press "/" key to search, type CALLIGRA_DEBUG_GUI, press Enter. When you find it, if it's set to OFF, press enter to switch it to ON.

Similarly, find the KEXI_DEBUG_GUI variable and set it to ON.

You need to reconfigure the project to apply changes. To do so, press "c" key and wait until the configuration step finishes. Then press "q" key to exist from ccmake.

Now compile Kexi using:

% make -j{NUMBER} install".

Enabling the Debug GUI

Once compiled, the tool can be freely enabled or disabled. When enabled, each Kexi application displays additional window used for outputting debug information.

To enable the GUI, dedicated setting should be altered once in Kexi's configuration file. To do so, open the local kexirc file:

% kate `kde4-config --localprefix`/share/config/kexirc
Note-box-icon.png
Note
The command kde4-config --localprefix returns general value of current local prefix for your user account, this is useful since you might have set a custom prefix as advertised in the Calligra/Building article. So for custom prefix it may be something like $HOME/kde4/inst/.kde4/ rather than $HOME/.kde.

The file is in a simple INI format. Now find a [General] section, and ShowInternalDebugger setting within it. Change the section to true. If the setting line is missing, insert it. The section would finally look like:

[General]
ShowInternalDebugger=true

This page was last edited on 26 April 2014, at 15:48. Content is available under Creative Commons License SA 4.0 unless otherwise noted.