View Issue Details

IDProjectCategoryView StatusLast Update
0000252XdebugUncategorizedpublic2020-03-12 17:16
Reporterqwix Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Summary0000252: Fancy HTML table
Description

Hello Derick,
as discussed today you will find the patch attached to this issue.

Additional Information

Index: xdebug.c

RCS file: /repository/xdebug/xdebug.c,v
retrieving revision 1.377
diff -u -r1.377 xdebug.c
--- xdebug.c 4 Apr 2007 11:11:04 -0000 1.377
+++ xdebug.c 8 Apr 2007 18:07:28 -0000
@@ -1598,25 +1598,25 @@
};

static char* html_formats[10] = {

  • "<br />\n<font size='1'><table border='1' cellspacing='0' cellpadding='1'>\n",
  • "<tr><th align='left' bgcolor='#f57900' colspan=\"5\"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> %s: %s in %s on line <i>%d</i></th></tr>\n",
  • "<br />\n<table border='0' cellspacing='1' cellpadding='1' style='border-top: 1px solid #aaa;border-bottom: 1px solid #aaa;border-collapse: collapse;'>\n",
  • "<tr><th align='left' colspan=\"5\" style='color: 0000222;background-color: #f57900;border: 1px solid 0000222;'>%s: %s in %s on line <i>%d</i></th></tr>\n",
    #if HAVE_PHP_MEMORY_USAGE
  • "<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>\n",
  • "<tr><td bgcolor='#eeeeec' align='center'>%d</td><td bgcolor='#eeeeec' align='center'>%.4f</td><td bgcolor='#eeeeec' align='right'>%ld</td><td bgcolor='#eeeeec'>%s( ",
  • "<tr><th align='left' colspan='5' style='color: 0000222;background-color: #e9b96e;border: 1px solid 0000222;'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec' style='border-left: 1px solid #aaa;border-right: 1px solid #aaa;'>#</th><th align='left' bgcolor='#eeeeec' style='border-left: 1px solid #aaa;border-right: 1px solid #aaa;'>Time</th><th align='left' bgcolor='#eeeeec' style='border-left: 1px solid #aaa;border-right: 1px solid #aaa;'>Memory</th><th align='left' bgcolor='#eeeeec' style='border-left: 1px solid #aaa;border-right: 1px solid #aaa;'>Function</th><th align='left' bgcolor='#eeeeec' style='border-left: 1px solid #aaa;border-right: 1px solid #aaa;'>Location</th></tr>\n",
  • "<tr bgcolor='%s' onmouseover='this.style.background=\"#d0d7e2\";' onmouseout='this.style.background=\"%s\";'><td align='center' style='border-left: 1px solid #aaa;'>%d</td><td align='center' style='border-left: 1px solid #aaa;'>%.4f</td><td align='right' style='border-left: 1px solid #aaa'>%ld</td><td style='border-left: 1px solid #aaa;'>%s( ",
    #else
    "<tr><th align='left' bgcolor='#e9b96e' colspan='4'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>\n",
    "<tr><td bgcolor='#eeeeec' align='center'>%d</td><td bgcolor='#eeeeec' align='center'>%.4f</td><td bgcolor='#eeeeec'>%s( ",
    #endif
    "<font color='#00bb00'>'%s'</font>",
  • " )</td><td title='%s' bgcolor='#eeeeec'>..%s<b>:</b>%d</td></tr>\n",
  • " )</td><td style='border-left: 1px solid #aaa;border-right: 1px solid #aaa;' title='%s'>..%s<b>:</b>%d</td></tr>\n",
    #if HAVE_PHP_MEMORY_USAGE
  • "<tr><th align='left' colspan='5' bgcolor='#e9b96e'>Variables in local scope (#%d)</th></tr>\n",
  • "<tr><th align='left' colspan='5' style='color: 0000222;background-color: #e9b96e;border: 1px solid 0000222;'>Variables in local scope (#%d)</th></tr>\n",
    #else
    "<tr><th align='left' colspan='4' bgcolor='#e9b96e'>Variables in local scope (#%d)</th></tr>\n",
    #endif
  • "</table></font>\n",
  • "<tr><td colspan='2' align='right' bgcolor='#eeeeec' valign='top'><pre>$%s =</pre></td><td colspan='4' bgcolor='#eeeeec'>%s</td></tr>\n",
  • "<tr><td bgcolor='#eeeeec'>$%s</td><td colspan='4' bgcolor='#eeeeec' colspan='2'><i>Undefined</i></td></tr>\n"
  • "</table>\n",
  • "<tr><td colspan='2' align='right' bgcolor='#eeeeec' valign='top' style='border-left: 1px solid #aaa;'><pre>$%s = </pre></td><td colspan='4' bgcolor='#eeeeec' style='border-right: 1px solid #aaa;'>%s</td></tr>\n",
  • "<tr><td bgcolor='#eeeeec' style='border-left: 1px solid #aaa;' colspan='2' align='right'>$%s </td><td colspan='4' bgcolor='#eeeeec' colspan='2' style='border-right: 1px solid #aaa;'><span style='color:red'>Undefined</span></td></tr>\n"
    };

    static void dump_used_var_with_contents(void htmlq, xdebug_hash_element he, void *argument)
    @@ -1652,6 +1652,7 @@
    }

    if (!zvar) {

  • // $var = Undefined
    xdebug_str_add(str, xdebug_sprintf(formats[9], name), 1);
    return;
    }
    @@ -1663,6 +1664,7 @@
    }

    if (contents) {

  • // $var = value
    xdebug_str_add(str, xdebug_sprintf(formats[8], name, contents), 1);
    } else {
    xdebug_str_add(str, xdebug_sprintf(formats[9], name), 1);
    @@ -1763,7 +1765,13 @@
    tmp_name = xdebug_show_fname(i->function, html, 0 TSRMLS_CC);
    if (html) {
    #if HAVE_PHP_MEMORY_USAGE
  • xdebug_str_add(&str, xdebug_sprintf(formats[3], i->level, i->time - XG(start_time), i->memory, tmp_name), 1);
  • / lines alternance /
  • if( i->level%2 == 0 ) {
  • xdebug_str_add(&str, xdebug_sprintf(formats[3], "#f0f1f2", "#f0f1f2" , i->level, i->time - XG(start_time), i->memory, tmp_name), 1);
  • }
  • else {
  • xdebug_str_add(&str, xdebug_sprintf(formats[3], "#ffffff", "#ffffff" , i->level, i->time - XG(start_time), i->memory, tmp_name), 1);
  • }
    #else
    xdebug_str_add(&str, xdebug_sprintf(formats[3], i->level, i->time - XG(start_time), tmp_name), 1);
    #endif
TagsNo tags attached.
Operating SystemLinux : 2.6.15
PHP Version5.1.6

Activities

derick

2009-12-27 16:57

administrator   ~0001213

Since Xdebug 2.0.3 or something, all output by Xdebug uses a CSS class that you can use instead now.

Issue History

Date Modified Username Field Change
2007-04-10 12:55 qwix New Issue
2009-12-27 16:57 derick Note Added: 0001213
2009-12-27 16:57 derick Status new => resolved
2009-12-27 16:57 derick Resolution open => fixed
2009-12-27 16:57 derick Assigned To => derick
2020-03-12 16:55 derick Severity trivial => feature
2020-03-12 17:16 derick Category Feature/Change request => Uncategorized