제이슨은이 문제에 대한 좋은 해결책을 제시합니다 in this video (14:48부터 시작). 그의 예에서 콜백이 있었고 콜백이 완료되기 전에 다른 페이지로 이동 한 경우 응용 프로그램이 충돌했습니다. 이 경우 앱에 해당 할 수 있습니까? 탐색 할 때 진행되는 작업에 대한 자세한 내용은 무엇입니까? 다른 사람을 위해
(이 보이기 때문에 당신은 이미 이것에 대해 알고있다!) :
는 WinJS.Application.OnError event을 사용, 쉽게 디버깅 할 수 있으려면. 앱이 충돌하기 전에 문제에 대한 정보를 덤프하는 이벤트 핸들러를 연결합니다.
WinJS.Application.onerror = function (info) {
var err = {
errorMessage: info.detail.errorMessage,
errorUrl: info.detail.errorUrl,
errorLine: info.detail.errorLine,
errorCharacter: info.detail.errorCharacter,
};
Windows.Storage.ApplicationData.current.localFolder
.createFileAsync("crash.txt", Windows.Storage.CreationCollisionOption.openIfExists)
.then(function (file) {
Windows.Storage.FileIO.appendLinesAsync(file, [JSON.stringify(err)]);
});
};
고마워요. – wukong
좋은 소식! Windows 이벤트 로그에 버블 링되는 이벤트는 Store 크래시 덤프에서 얻을 수있는 것과 거의 같습니다. 따라서 WinJS.Application.onerror에 거품이 생기지 않는 한 '설명 할 수없는 충돌'이 생산 과정에서 눈에 띄지 않을 것이라고 확신 할 수 있습니다. – deepelement