Updated: 9/10/2015
Important: We no longer maintain this article but if you’re stuck, ask us a question on Stack using the tag ‘visual-studio-cordova'. Also, subscribe to our developer blog. We regularly post issues and workarounds.
This article covers known issues and limitations related to Visual Studio Debugger in Visual Studio Tools for Apache Cordova 2015.
There is currently no Visual Studio debugger support for Windows Phone 8. Developers can use the Weinre (Web Inspector Remote) project as described in this blog post from MS OpenTech as an alternative.
Due to a race condition, the VS debugger will not consistently stop at breakpoints that occur prior to the first page load in Ripple or Android emulators or devices. This can be problematic when attempting to debug code tied to page "load" or "device ready" events on the very first page of your app. However, these breakpoints will be hit after refreshing the browser (Ripple) or executing window.location.reload() from the JavaScript Console.
If, after upgrading Visual Studio, you see the error message, "The debugger cannot continue running the process. Unable to start debugging.", a library may have been corrupted. Try the following workaround. Close all VS instances, then go to %appdata%\username\Local\Microsoft\Phone Tools, and rename the CoreCon folder to another name such as CoreCon2. Then try restarting your app in VS.
When debugging an application deployed to the Ripple emulator, the JavaScript Console's default execution target is the Ripple top-level, instead of the application frame. To switch to the execution target of the user’s application, change the execution target of the JavaScript Console to the "frame: <application html page>" target using the target selector in the upper right of the JavaScript Console window.
You cannot use the VS debugger for apps deployed to Android emulators or devices that are built in the Release Solution Configurations (by design) because they are signed. JavaScript console output is, however, captured in the Output window.
VS debugger detaches when using Chrome Dev Tools: If you start up Chrome Dev Tools in Ripple when debugging from VS, Ripple will shut down. To use Chrome Dev Tools, start without debugging (Ctrl+F5).
Limitations:
No debugger support for Android < 4.4 w/jsHybugger: You cannot use the VS Debugger for apps deployed to emulators or devices running Android versions prior to 4.4 without the use of a 3rd party plugin like jsHybugger. JavaScript console output is, however, captured in the Output window.
Unable to start program error: While debugging to devices with Android versions prior to 4.4, an error popup may display the error “Unable to start program” citing “adb.exe” as the cause. The app should still load and work on your device, without debugger support.
Limitations: The following limitations exist when using the VS debugger with jsHybugger:
JavaScript console read only: While using the JavaScript Console with the jsHybugger, the JS Console works as output only – messages are logged but we do not execute commands. We also do not support source locations of messages, clearing messages on navigation, and expanding objects and properties of the logged messages.
Did you find this article helpful?
Thanks!
We're sorry to hear that! Feel free to email our team with your question.