외부에 콜백이있는 경우 Firebug 콘솔이 오류를 인쇄합니다. 그러나, 내가 개미 오류 안에 콜백이 있으면 인쇄물이 표시되지 않습니다.자바 스크립트 오류 콘솔은 콜백 내에서 오류를 출력하는 방법은 무엇입니까?
document.observe('dom:loaded', function() {
// not notified in console
alert(undefinedVariable);
});
// notified in console
alert(anotherUndefinedVariable);
거의 모든 내 코드가 콜백 내부에 있으므로 오류를 추적하기가 어렵습니다. 오류가 발생한 위치에 관계없이 콘솔에있는 모든 오류를 어떻게 인쇄합니까?
Prototype을 사용하고있는 것 같으니까요? : http://stackoverflow.com/questions/2601411/prototype-callback-functions-swallowing-exceptions –
Chrome에서 동일한 코드를 사용해 보셨습니까? –