用于Apache Cordova的Visual Studio工具在更新后停止工作正确

问题描述:

我正在使用Visual Studio Tools for Apache Cordova开发离子应用程序。在我为Visual Studio更新了用于Apache Cordova的工具和TypeScript工具之前,一切都还可以。
更新后,Ripple模拟器变得不稳定,并在输出窗口中出现下一个错误。

I am developing ionic application with Visual Studio Tools for Apache Cordova. Everything was OK until I updated Tools for Apache Cordova and TypeScript Tools for Visual Studio. After this update Ripple emulator became unstable and get the next error in the Output window.

code:-32000
message:Debugger agent is not enabled
The source map 'angular-sanitize.min.js.map' for file 'mdha:http://code.ionicframework.com/1.0.0-rc.5/js/ionic.bundle.min.js' could not be read from the specified location due to error 'Exception of type 'TypeScriptSourceMapReader.SourceMapReadFailedException' was thrown.'.

我在项目中没有使用TypeScript而且我不熟悉它。我该怎么做才能解决它?我想我可以删除我的更新。

I am not using TypeScript in my project and I'm not familiar with it. What can I do for fix it? I guess I can remove my updates.

有人可以建议我其他更好的方式吗?

Could anybody suggest me any other better way?

感谢 Michael Braude ,他帮我解决了这个问题。正如他解释的那样,用于Apache Cordova的Visual Studio工具在更新v2之后使用相同的端口进行调试。

Thank Michael Braude, he helped me walk over this issue. As he explained, Visual Studio Tools for Apache Cordova uses same port for debugging after update v2.

有两种方法可以解决这个问题。

There are two way to walk over this issue.


  1. 使用 JavaScript控制台。坦率地说,当我在具有两个显示器的PC上进行开发时,这种方式对我来说是可以的(我在一个屏幕上运行模拟器并在另一个屏幕上使用Visual Studio进行调试),但是当我在带有一个屏幕的Notebook上进行开发时,有点不舒服。

  2. 运行没有调试的解决方案(CTRL + F5),在这种情况下VS的调试器没有连接到浏览器。这看起来很简单,但您需要注意,在这种情况下,断点不会停止运行时,您必须使用调试器; 关键字。

  1. Use JavaScript Console of Visual Studio. Frankly, this way is OK for me when I am developing on PC with two displays (I runs emulator on one screen and debug with Visual Studio on another), but a bit uncomfortable when I am developing on Notebook with one screen.
  2. Run a solution without debugging (CTRL+F5), in this case VS's debugger isn't attached to browser. This looks as simple solution, but you need to be aware that in this case breakpoints don't stop run-time and you have to use debugger; keyword.