【发布时间】:2015-03-05 20:11:54
【问题描述】:
我刚刚创建了一个 vs-cordova 应用程序。当我在 chrome 浏览器上运行此应用程序时,一切都按预期工作。
但是, 调试器在 cordova.js 和 index.js 结束时中断。 index.js 如下。断点击中最后的粗体区域。但为什么?我在输出区域中看不到任何内容。我通过 CTRL+Alt+E 打开了 CLR 错误,但也没有帮助。我也没有在 js-output 上看到任何错误。该函数是匿名的,没有名称。所以最后的括号看起来不错,不是吗?
现在,我只是按 F5 并继续。这很酷,但我发现这有点烦人!特别是对于 android 目标。它破坏了许多地方的代码。你对我有什么建议吗?
顺便说一句,据我所知,调试器首先停止了在我开始调试时添加到项目中的 cordova.js,然后找到 index.js。
(function () {
"use strict";
document.addEventListener( 'deviceready', onDeviceReady.bind( this ), false );
function onDeviceReady() {
// Handle the Cordova pause and resume events
document.addEventListener( 'pause', onPause.bind( this ), false );
document.addEventListener( 'resume', onResume.bind( this ), false );
// TODO: Cordova has been loaded. Perform any initialization that requires Cordova here.
};
function onPause() {
// TODO: This application has been suspended. Save application state here.
};
function onResume() {
// TODO: This application has been reactivated. Restore application state here.
};
})();
【问题讨论】:
标签: visual-studio-cordova ripple