Ripple Emulator / Chrome Browser closing when I attempt to open developer tools

喜你入骨 提交于 2019-12-11 04:19:13

问题


I am trying to use Ripple inside Visual Studio 2015 to debug my app. I want to view Local Storage, but when I open developer tools, Chrome closes and the Javascript console displays this error:

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.'.The source map is using an unsupported formatThe source map is using an unsupported formatThe source map is using an unsupported format

How can I get rid of the error?

Edit

I created a new project using File->New Project->Javascript->Apache Cordova Apps->Ionic Tabs App. I was presented with a dialog:

Your project uses a version of TypeScript older than the version currently installed with Visual Studio. You may get errors if you try to build the project. Would you like us to upgrade the TypeScriptToolsVersion in your project file so you don't see this warning again?

Answer "No" and the problem I had occurs. Answer "Yes" and it doesn't.....so I guess I need to figure out how to get Visual Studio to give me the dialog again, or work out how to change it manually....

EDIT 2 I tried this:

  1. Right click on the project -> unload
  2. Right click again -> Edit MyProject.jsproj
  3. Changed <TypeScriptToolsVersion>1.4</TypeScriptToolsVersion> to 1.6

No luck yet...

EDIT 3 I just realised that the message regarding the source map 'angular-sanitize.min.js.map' not being read is always displayed when I close the browser window, not just when it crashes. So the message is probably not much help for this particular issue.

EDIT 4 I copied my App into the new, working project created using Ionic Tabs App and I still get the problem. So probably two different root causes.


回答1:


I'm sorry for your trouble. There is a bug in Visual Studio 2015 where VS will close Chrome if it is debugging and the Chrome Dev Tools are brought up. The reason this happens is because the Dev Tools send a disconnect signal to any debugger that is already attached, and at the moment VS interprets this message as a sign that the Chrome has closed, so it exits the process.

We have a fix for this coming out in a future Cordova Update (it is slated for Update 4 which should be in a few weeks). In the meantime, you can get around the issue by launching Ripple from VS without the debugger attached. You can either do this by pressing ctrl + F5, or by clicking this menu item:

Thanks again for reporting this issue! Please note - the other issues are unrelated to Chrome closing. They should be benign.

** Update 11/3/2015 ** We just released update 4 which fixes this problem. Please let me know if you still run into problems.



来源:https://stackoverflow.com/questions/32868731/ripple-emulator-chrome-browser-closing-when-i-attempt-to-open-developer-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!