xdebug의 빨간색과 노란색 표준 색상으로 몇 시간 후에 눈이 손상 될 수 있습니다.xdebug 출력의 색상을 변경하는 방법은 무엇입니까?
http://www.designified.com/blog/article/76/restyling-xdebug-output은 스타일을 jquery가 필요한 javascript로 바꾸는 방법을 설명합니다.
나는 더 직선적 인 방법을 찾고 마침내 하나를 발견했습니다.
xdebug의 빨간색과 노란색 표준 색상으로 몇 시간 후에 눈이 손상 될 수 있습니다.xdebug 출력의 색상을 변경하는 방법은 무엇입니까?
http://www.designified.com/blog/article/76/restyling-xdebug-output은 스타일을 jquery가 필요한 javascript로 바꾸는 방법을 설명합니다.
나는 더 직선적 인 방법을 찾고 마침내 하나를 발견했습니다.
해결 방법은! important 태그이며 기존 스타일 값을 덮어 씁니다. Xdebug는 사용시 눈의 암을 방지하기 위해 다음과 같은 CSS 코드를 사용
.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;
}
// 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
}
// +---------+---------+---------+---------+---------+---------+---------+
작성한 내용을 쉽게 이해할 수 있도록 설명을 추가하십시오. –
또 다른 옵션 위해서 var_dump 과부하 Xdebug는 비활성화하는 것입니다. php.ini [XDebug]
섹션에서 다음을 추가하십시오. xdebug.overload_var_dump=0
출력 형식은 사용자가 결정합니다. 그런 식으로 <pre>
태그를 인쇄하는 자신의 디버그 함수에 var_dump
을 래핑 할 수 있습니다.
눈 암 :) 고유 한 솔루션을 대체하고 있습니까? 믿을 수는 있지만 쉽게. 어쩌면 append_file (아파치에서)을 결합하는 것이 글로벌 솔루션이 될 수 있습니다. 감사. – erm3nda
이 CSS 코드는 어디에 넣어야합니까? 질문에 연결된 페이지는 더 이상 존재하지 않습니다 ... – TheStoryCoder
브라우저에 추가 기능을 통해 사용자 정의 스타일이 필요합니다. 예를 들어 Tampermonkey와 사용자 정의 스크립트를 사용하면 CSS 규칙이 추가됩니다. 이 [gist] (https://gist.github.com/bueltge/1a5013d392c4fd864886ccddac5280dd) – bueltge