How to change the colors of xdebug output?

前端 未结 3 459

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 re

3条回答
  •  梦谈多话
    2021-01-24 19:19

    xdebug_css.png

    // notice the line height, the padding(cellspacing), monospace font, font size, making readability better at least for me.
    //
    // A FILENAME : xdebug_stack_trace.css
    // 
    // This is how the xdebug_stack_trace.css is called from the index.php page
    // 
    // <style><?php require_once("./resources/css/xdebug_stack_trace.css");?></ style>
    // 
    // notice that on the line above there is a space between the slash
    // and the 'style', on the ending 'style' tag, otherwise the display
    // get all messed up when this page gets loaded.
    // 
    // make sure that when you copy the 'style' line from here to the
    // index page, that you remove the extra space at the ending 'style'
    // tag of the index page.
    // +---------+---------+---------+---------+---------+---------+---------+
    // orange/black td header line
    // +---------+---------+---------+---------+---------+---------+---------+
    .xdebug-error th
    {
        font-family:monospace;
        font-weight:normal;
        font-size:15px;
        padding: 6px 6px 6px 6px;
        border:1px solid black;
        background: #FFCC99;    // orange
        color:#000000;          // black 
    }
    // +---------+---------+---------+---------+---------+---------+---------+
    // black/white th header line
    // +---------+---------+---------+---------+---------+---------+---------+
    .xdebug-error > tr:first-child > th:first-child,
    .xdebug-error > tbody > tr:first-child > th:first-child
    {
        line-height:1.6em;
        padding: 10px 10px 10px 10px;
        border:1px solid #000000;
        background: #000000;          // black
        color:#FFFFFF;
    }
    // +---------+---------+---------+---------+---------+---------+---------+
    // green/black td content one or more lines
    // +---------+---------+---------+---------+---------+---------+---------+
    .xdebug-error td
    {
        font-size:14px;
        padding: 6px 6px 6px 6px;
        border:1px solid green;
        background: #D1FFE8;          // light green
    }
    // +---------+---------+---------+---------+---------+---------+---------+
    

提交回复
热议问题