【问题标题】:Why Visual Studio Cordova project always resumes while debugging for parenthesis in index.js为什么 Visual Studio Cordova 项目总是在调试 index.js 中的括号时恢复
【发布时间】: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


    【解决方案1】:

    这是由于我们最近更新 Chrome 后出现的网络调试代码中的一个问题。它已在最近发布的 VS 2015 CTP6 中修复。它也将在我们对 VS2013 的下一次扩展更新中得到修复。

    【讨论】:

    • 好的。谢谢。在办公室我使用 VS2013 Update 4 并且它很好。但是在家里我使用 VS2013 Community 并且它发生了。
    猜你喜欢
    • 2019-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-15
    • 2016-09-10
    • 2022-11-30
    • 1970-01-01
    相关资源
    最近更新 更多