Search code examples
androidgoogle-chromecordovawebsocketremote-debugging

Android Chrome Remote Debugging Breakpoints ignored after WebSocket send


I am trying to debug an issue in a phoneGap based application that uses the WebView. I followed steps in

https://developer.chrome.com/devtools/docs/remote-debugging

to setup debugging a webview. I am able to debug and and set breakpoints fine accept in the following scenario:

During a android chrome remote debugging session I set breakpoints in the javascript console. Initially my breakpoints are hit and the application pauses. However when my application sends data through a WebSocket my breakpoints pause for a moment but then proceed without me pressing continue. How can I get breakpoints to be honored during WebSocket communication?


Solution

  • The issue was that I was using a WebSocket library. When I removed the library and just used the native Websocket (supported in android KitKat browsers) the issue went away. So the problem was with the WebSocket library.