I only just noticed that my work computer wasn’t outputting var_dumps nicely like my laptop did, and I knew XDebug took care of that, so I looked into it in more detail! Basically there are TWO settings. Make sure both are on:

 xdebug.overload_var_dump
html_errors

And voila! You can now read your var_dumps a lot more easily! However it looks disgusting and orange, so lets fix that too:

.xdebug-error {
 width: 97%;
 margin: 10px auto;
 border-collapse: collapse;
 border-right: 1px #5b5440 solid;
 border-left: 1px #5b5440 solid;
 border-bottom: 1px #5b5440 solid;
 }
.xdebug-error th,
 .xdebug-error td {
 padding: 4px 6px 3px 5px;
 border-left: none;
 border-right: none;
 }
.xdebug-error th:first-child {
 padding-top: 0;
 }
.xdebug-error th {
 background-color: #515151;
 color: #EEEEEE;
 }
.xdebug-error td {
 background-color: #EEEEEE;
 border-top: 1px #5b5440 solid;
 border-bottom: #DFBA69;
 }
.xdebug-error span {
 background-color: inherit !important;
 color: #FFFF00 !important;
 }

debug   Much nicer! 😀

Advertisements