zotero debug output file is created empty

Hello.

I'm trying to debug a problem with Better BibTeX plugin (https://github.com/retorquere/zotero-better-bibtex/issues/2025).

I have a portable installation of zotero 5.0.96.3 in Windows, in a USB Drive. When I use the command line interface to go to the "ZoteroPortable" directory and run Zotero like this:

J:\PortableApps\ZoteroPortable>ZoteroPortable.exe -ZoteroDebugText > mydebugfile.txt


...the output text file is created empty.


Right now I'm on a Windows 10 Pro 20H2, OS version is 19042.1415
  • That doesn't work on Windows. Use the debug output window.
  • edited January 17, 2022
    But -ZoteroDebug does work, right? And everything that would usually be output by -ZoteroDebugText ends up in the debug viewer?
  • Sure, but for anything other than a startup hang that's just View → Debug Output Logging → Restart with Logging Enabled.
  • edited January 17, 2022
    We're hitting a problem where sporadically BBT is seen as installed in the addons pane, but the BBT overlays do not appear to be applied, which means BBT won't start. In these cases, there is zero BBT activity in the log, nor do I see the usual addons.manager chatter at the start of the log.

    Edit: and as the problem doesn't always happen, we want a way to always start up with logging so that if it does occur, we have logging on.
  • Redirecting the debug output logging to a file should work on Windows. Maybe you're getting issues related to space characters or due to using a portable version of Zotero.

    I'm using this batch script on a Windows setup for starting Zotero and saving the debug output to a text file.
  • @qqbb: Not sure how that's working for you. It's not working for me from either the command line or that batch file in cmd.exe or Cygwin in Windows 10. I don't think it's worked in years.
  • The debug instructions at https://www.zotero.org/support/debug_output for windows do still say that it should work.
  • @dstillman: I just successfully tested the script on two Windows 10 setups that don't have Cygwin installed, Enterprise 21H2 and Pro 21H2. I'd guess you're not running Windows Home. So perhaps Cygwin is the culprit?

    You could try redirecting standard error. Perhaps something like this might work:
    zotero.exe -ZoteroDebugText > log.txt 2>&1
    zotero.exe -ZoteroDebugText &> log.txt

    Alternatively, you could try removing Cygwin from your PATH. If you run sysdm.cpl ,3 you can edit your PATH environment variables.
  • No, Cygwin isn't relevant here — it happens in cmd.exe too — and Zotero uses stdout, not stderr. I can't say why it's working for you, but I believe you're the exception here. As I say, I don't think this has worked in general in years (maybe since we last upgraded the Firefox base).
  • I've first used the script a few months ago with the beta. It's possible that I tried to run something similar earlier and it was failing, but I don't remember details. But that earlier attempt might have been on a setup that had Cygwin installed. The idea was that Cygwin might be replacing some of the functions in cmd.exe as well, but I'm not an expert on it. I agree that it would be strange if Cygwin was actually the culprit, though.
  • Doesn't work for me in PowerShell either.

    Someone on our team is getting logged output with a Windows 11 install, however. Weirdly, the output still doesn't appear directly in the cmd window, and only shows up in the -console window. But the redirection works without -console.
Sign In or Register to comment.