GNOME Bugzilla – Bug 591282
a switch to activate debug when executing orca
Last modified: 2009-11-09 21:35:21 UTC
To activate debug in orca, we need to uncomment some lines in the user-settings.py file. After the debug session is finished, you need to comment the lines again to disable the debug. My suggestion is to create a switch to activate the debug when executing orca. Orca could be called in the following way: orca --debug --debug-file=debug.txt If the --debug-file switch is omitted, the following would be assumed: 'debug-%Y-%m-%d-%H:%M:%S.out'
Created attachment 140292 [details] [review] A small patch to implement a --debug switch This patch try to address what is suggested. Two switches are created, --debug and --debug-file. They are not present in the usage display, because I am not sure if new strings can be added. Basically I tried to implement what is suggested in the documentation to activate the debug. This is also my first try to implement something in orca, hope to be done in the correct way.
(In reply to comment #1) > Created an attachment (id=140292) [edit] > A small patch to implement a --debug switch > > This patch try to address what is suggested. Two switches are created, --debug > and --debug-file. They are not present in the usage display, because I am not > sure if new strings can be added. > Basically I tried to implement what is suggested in the documentation to > activate the debug. > It doesn't work because in the user-settings.py there is the following line: orca.debug.debugLevel = orca.debug.LEVEL_SEVERE This line overrides the set made to debug.debugLevel in the patch, since the loadUserSettings is called after I change the value of the variable debugLevel.
Created attachment 140509 [details] [review] revision 2 Another try! I moved the logic that sets the variables used in the debug routines, so that it is executed after the settings are imported.
Created attachment 141000 [details] [review] Patch that was committed This patch adds the usage text and updates the man page. Committed to git master for 2.27.91. Thanks!