Ray로 향상된 디버깅
6824 단어 webdevjavascriptdebuggingphp
Ray는 PHP , Ruby , JavaScript & TypeScript , NodeJS 및 Bash 응용 프로그램을 지원합니다. Laravel , Wordpress , Vue 등 여러 프레임워크용 라이브러리가 있습니다.
많은 라이브러리가 자사 패키지이며 Spatie의 패키지로 알려진 품질입니다.
Ray에 정보를 보내기 위해 라이브러리 중 하나를 설치한 후
ray
기능을 사용하여 항목을 빠르게 덤프할 수 있습니다. ray
에 전달하는 모든 데이터가 표시됩니다.Ray는 코드 실행 일시 중지와 같은 고급 기능도 지원합니다.
라라벨의 지원은 틀림없이 지원되는 많은 프레임워크 중 최고입니다. 데이터베이스 쿼리를 자동으로 표시하는 것과 같은 Laravel의 고급 디버깅 기능이 있습니다:
ray()->showQueries();
// this query will be displayed.
User::firstWhere('email', '[email protected]');
ray()->stopShowingQueries();
// this query won't be displayed.
User::firstWhere('email', '[email protected]');
vue-ray
패키지와 함께 디버깅용 패키지VueJS code도 있습니다.Vue 구성 요소로 작업할 때 데이터 변수의 변경 사항을
track(name)
메서드를 사용하여 실시간으로 추적하고 표시할 수 있습니다.<script>
export default {
props: ['title'],
data() {
return {
one: 100,
two: 22,
};
},
created() {
this.$ray().track('one');
},
mounted() {
setInterval( () => { this.one += 3; }, 4000);
}
}
</script>
node-ray package 이 있는 NodeJS 또는 Electron 앱을 포함하여 또는 앱에 대한 패키지도 사용할 수 있습니다.
웹 페이지에서 Ray를 사용하려면 CDN을 통해 독립형 번들을 사용하십시오.
<script src="https://cdn.jsdelivr.net/npm/axios@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/node-ray@latest/dist/standalone.js"></script>
<script>
window.ray = Ray.ray;
document.addEventListener('DOMContentLoaded', event => {
ray('document finished loading!');
});
</script>
현재 작업 중인 대부분의 응용 프로그램을 디버깅하는 데 Ray를 사용하고 있으며 개발이 더 쉬워졌습니다. 디버깅 시간을 줄이고 코드 작성에 더 많은 시간을 할애합니다.
Ray는 코드를 많이 작성한다면 확인해 볼 가치가 있는 앱입니다. free demo도 사용할 수 있습니다.
Reference
이 문제에 관하여(Ray로 향상된 디버깅), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/patinthehat/enhanced-debugging-w-ray-24o0텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)