phphtmlcssxdebug

How to change the colors of xdebug output?


The red and yellow standard colors of xdebug can hurt your eyes after a few hours.

http://www.designified.com/blog/article/76/restyling-xdebug-output describes how to replace the style with javascript requiring jquery.

I was looking for a more straight forward way and finally found one.


Solution

  • The solution is the !important tag, it overrides the existing style values. Use the following css code to avoid eye cancer when using xdebug:

    .xdebug-error {
        font-size: 12px !important;
        width: 95% !important;
        margin: 0 auto 10px auto !important;
        border-color: #666 !important;
        background: #ddd !important;
    }
    
    .xdebug-error th, .xdebug-error td {
        padding: 2px !important;
    }
    
    .xdebug-error th {
        background: #ccc !important;
    }
    
    .xdebug-error span {
        display: none !important;
    }
    
    .xdebug-error_description th {
        font-size: 1.2em !important;
        padding: 20px 4px 20px 100px !important;
        background: #ccc no-repeat left top !important;
    }
    
    .xdebug-error_callStack th {
        background: #666 !important;
        color: #ddd !important;
    }