xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Changes between Version 32 and Version 33 of Debugging


Ignore:
Timestamp:
02/08/14 02:25:49 (7 years ago)
Author:
Antoine Martin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Debugging

    v32 v33  
    1414
    1515== First Things ==
    16 Always try to narrow it down as much as possible, by turning off as many features as possible (clipboard, etc) and trying various encodings.
     16Always try to narrow it down as much as possible, by turning off as many features as possible (clipboard, etc) and trying various encodings. Try another operating system, try a different version, etc
    1717
    1818== Debug Builds ==
    19 If a debug build is available, please use it. It may provide more useful diagnostic messages.
     19If a debug build is available, please try to use it. It may provide more useful diagnostic messages.
    2020You can generate debug builds by calling {{{setup.py}}} with the {{{--with-debug}}} flag (or by setting {{{DEBUG=1}}} in the MS Windows [/browser/xpra/trunk/src/win32/MAKE-INSTALLER.BAT BAT file])
    2121}}}
     
    2525== Via Logging ==
    2626Sometimes the problem is so obvious that you will simply get the error directly from the command line or in the server log file.
    27 You may also want to run the server with the {{{--no-daemon}}} switch to more easily keep an eye on its log file and status.
    2827[[BR]]
    2928
    30 Otherwise, a good first step is to start xpra from the command line and add "{{{-d all}}}" to it.
    31 The amount of data logged can be overwhelming, so make sure you log it or redirect it to a file that you can then grep to find and extract the data you are looking for.
     29Otherwise, a good first step is to start xpra from the command line and add "{{{-d CATEGORY}}}" to it. The list of categories can be found with {{{xpra -d help}}}.
     30The amount of data logged can be overwhelming, especially with the pseudo-category {{{all}}}, so make sure you log it or redirect it to a file that you can then grep to find and extract the data you are looking for.
    3231
    3332[[BR]]
    3433
    35 Some modules do not log by default, either to reduce the amount of logging or to avoid the overhead of logging in critical paths. Logging can generally be enabled using environment variables, you can find the list of such runtime configuration options with:
     34Each category can also be enabled using environment variable, which can be useful if you cannot modify the command line, or if the logging should happen very early on, or if you aren't calling the code from its normal wrappers.
     35Use: {{{XPRA_CATEGORY_DEBUG=1 xpra ...}}} to enable debug logging for your chosen {{{CATEGORY}}}.
     36
     37[[BR]]
     38It is also possible to enable and disable debug logging at runtime using:
    3639{{{
    37 egrep -re "XPRA_.*DEBUG|XPRA_.*LOG" src/xpra | grep 'os.environ'
    38 egrep -re "XPRA_.*DEBUG|XPRA_.*LOG" src/wimpiggy | grep 'os.environ'
     40xpra control :DISPLAY debug enable CATEGORY
    3941}}}
    40 At time of writing this shows the following options:
    41 * {{{XPRA_KEYBOARD_DEBUG}}}
    42 * {{{XPRA_DAMAGE_DEBUG}}} (damage events show which regions have been repainted)
    43 * {{{XPRA_DEBUG_SOUND}}}
    44 * {{{XPRA_X11_LOG}}} (enables logging for X11 events)
    45 * {{{XPRA_X11_DEBUG}}} (logs all X11 events through going through our loop - this is very verbose)
     42and
     43{{{
     44xpra control :DISPLAY debug enable CATEGORY
     45}}}
     46And you can get the current list of debug loggers which:
     47{{{
     48xpra control :DISPLAY debug status
     49}}}
     50
    4651}}}
    4752
     
    5358grep 'os.environ' src/xpra
    5459}}}
    55 Notably:
     60Some examples:
    5661* some x264 attributes and thresholds: {{{XPRA_X264_*_PROFILE}}}, {{{XPRA_X264_*_MIN_QUALITY}}}, {{{XPRA_X264_*_QUALITY}}}
    5762* lossless damage threshold values (number of pixels): {{{XPRA_MAX_NONVIDEO_PIXELS}}} and {{{MAX_NONVIDEO_OR_INITIAL_PIXELS}}}