![]() |
#1 |
Enthusiast
![]() Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
|
Normal vs. Debug Mode
I've been having a bug with a plugin-which-shall-not-be-named recently which only shows up when calibre is in normal mode. When I restart in debug mode in order to generate the log file needed for a proper bug report, the process that failed before works fine. Is there anything in the debug infrastructure of calibre itself which would change the way the program works (besides the generation of the log file)? Further, is there some way that I can "backdoor" the debug mode so that calibre generates the debug log but "thinks" its in normal mode?
I realize that the actual problem is not one which can be addressed here, but I'm hoping for some insight into the difference between normal and debug mode so that I can extract the needed diagnostic information to addressed the problem in a more appropriate forum. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,259
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The main difference is that print statement are redirected to NUL in normal mode and a file in DEBUG mode. There are also a lot more print statements that become active -- this in turn can change the timing of various operations, which can cause timing/threading sensitive bugs to change their behavior.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
rpspringuel: What OS? I've had some reports on problems with a plugin I changed on Macs. They are getting "IOError: [Errno 32] Broken pipe" errors and the lines work out to print statements I left in the code. Most of the debug logging doesn't happen when not in debug mode, but I think I had three lines that would still execute/
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
|
I am on a Mac (10.10.4) and running calibre 2.54.0.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,259
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
On OS X the stdout and stderr streams get redirected to the ASL logging service for GUI apps. If you see errors happening in print statements, that usually implies the service is down/malfunctioning.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Enthusiast
![]() Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
|
Is there a way that I could capture the statements being directed to NULL in normal mode without turning on the full debug mode? I'm not terribly familiar with redirection and am not sure what's possible here, but presumably if this was possible it wouldn't change any timing (since the additional print statements wouldn't be activated) but it would give at least some diagnostic information.
If this sort of redirection isn't possible, could I make a change in the code and run from the git repository that would do something like this? |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,259
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In normal mode all print statements got to the ASL service, which usually is available via Console.app
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
|
Thank you. I found the "log" and have passed it along to the plugin author.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to start Calibre on Windows in debug mode | hakan42 | Development | 9 | 04-10-2024 05:34 PM |
Impossible to quit Caibre in debug mode (2.2) | PO40600 | Calibre | 4 | 09-08-2014 11:13 AM |
Kindle Touch Debug Mode Access | choclit | Kindle Developer's Corner | 2 | 11-22-2011 10:23 AM |
PRS-900 Any luck getting a root shell? or debug mode? | raisinbrain | Sony Reader | 0 | 01-05-2010 11:33 PM |
Debug mode of HanLin v3 | sang | HanLin eBook | 4 | 07-01-2009 04:00 PM |