# How to toggle 5.2beta out of debug mode?

**URL:** <https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042>\
**Category:** Beta Testing\
**Created:** [August 19, 2023, 9:38pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042 "2023-08-19T21:38:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [August 19, 2023, 9:38pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/1 "2023-08-19T21:38:53Z")

</div>

The beta (on Fedora and the AIO) appear to default to debug mode.

How do we switch to regular use mode??

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [August 19, 2023, 9:42pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/2 "2023-08-19T21:42:49Z")

</div>

What do you mean by debug mode?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [August 19, 2023, 9:58pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/3 "2023-08-19T21:58:38Z")

</div>

The “Debug” submenu exists in the Tools menu. And the extra Edit and Load buttons exist in the [Plugin Managerv2](https://gramps-project.org/wiki/index.php?title=Addon%3APlugin_ManagerV2) addon. Neither of those should exist normally.

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/0/07d2b4260331ac128febc0320bd733f721ba4073.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/e/e353ddf26e3ac10585a12b0c4be5991ab2716bf9.png)

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [August 19, 2023, 10:04pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/4 "2023-08-19T22:04:26Z")

</div>

You need to run Gramps with the optimize (-O) flag.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [November 18, 2023, 12:16am UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/5 "2023-11-18T00:16:59Z")

</div>

Are the Tools - \> Debug submenu items supposed to be compatible with 5.2?

Running “ **Generate testcases for Persons and Families…** ” on the beta2 for Windows gives the following errors to the console.

 

```python
Error Details: 
===================
27955599: ERROR: tool.py: line 298: Failed to start tool.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\plug\tool.py", line 288, in gui_tool
    tool_class(
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 331, in __init__
    self.init_gui(uistate)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 418, in init_gui
    self.run_tool(cli=False)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 466, in run_tool
    self.generate_family(person_h)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 1655, in generate_family
    with DbTxn(
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gen\db\txn.py", line 75, in __enter__
    self.db.transaction_begin(self)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\db\dbapi\dbapi.py", line 294, in transaction_begin
    self.dbapi.begin()
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\db\dbapi\sqlite.py", line 158, in begin
    self.execute("BEGIN TRANSACTION;")
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\db\dbapi\sqlite.py", line 136, in execute
    self.__cursor.execute(*args, **kwargs)
sqlite3.OperationalError: cannot start a transaction within a transaction
27981756: ERROR: tool.py: line 298: Failed to start tool.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gui\plug\tool.py", line 288, in gui_tool
    tool_class(
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 331, in __init__
    self.init_gui(uistate)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 418, in init_gui
    self.run_tool(cli=False)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 444, in run_tool
    self.generate_tags()
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\tool\testcasegenerator.py", line 1788, in generate_tags
    with DbTxn(
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\gen\db\txn.py", line 75, in __enter__
    self.db.transaction_begin(self)
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\db\dbapi\dbapi.py", line 294, in transaction_begin
    self.dbapi.begin()
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\db\dbapi\sqlite.py", line 158, in begin
    self.execute("BEGIN TRANSACTION;")
  File "C:\Program Files\GrampsAIO64-5.2.0\gramps\plugins\db\dbapi\sqlite.py", line 136, in execute
    self.__cursor.execute(*args, **kwargs)
sqlite3.OperationalError: cannot start a transaction within a transaction

System Information: 
===================
Gramps version: AIO64-5.2.0-r1-2ac9e80 
Python version: 3.11.4 (main, Aug 22 2023, 21:54:38) [GCC 13.2.0 64 bit (AMD64)] 
BSDDB version: 6.2.9 (6, 0, 30) 
sqlite version: 3.42.0 (2.6.0) 
LANG: en_US.UTF-8
OS: Windows

GTK version : 3.24.39
gobject version: 3.44.1
cairo version : (1, 24, 0)

```

 

The **`Check Localized Date Displayer and Parser...`** tool also failed with looping error after the above error. Gramps had to be killed with the Task Manager. But it worked after Gramps was restarted.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [November 23, 2023, 6:52pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/6 "2023-11-23T18:52:50Z")

</div>

@Nick-Hall  
Is the Tools → Debug tools → [**Generate testcases for Persons and Families…**](https://www.gramps-project.org/wiki/index.php/Plugins_Command_Line#Generate_Testcases_for_Persons_and_Families) supposed to work with Gramps 5.2beta2 AIO ?

I haven’t tried it on 5.1 since I cannot seem to get any variation of the -O optimize CLI parameter to work. (Neither as a Python3 parameter nor as a Gramps parameter.)

@DavidMStraub has created a dummy tree generator for Gramps Web stress testing. It seems like integrating the 2 would be a force multiplier.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [November 23, 2023, 6:58pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/7 "2023-11-23T18:58:27Z")

</div>

The test case generator should work on version 5.2, but it isn’t used much.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [November 23, 2023, 7:01pm UTC](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/8 "2023-11-23T19:01:51Z")

</div>

Could you try it on Linux? It [blows up (as described) when I try it in the AIO beta2](https://gramps.discourse.group/t/how-to-toggle-5-2beta-out-of-debug-mode/4042/5).
