Home > Mobile >  How AndroidStudio step debugging JS
How AndroidStudio step debugging JS

Time:10-04

Company set in the webview development, the absence of the front, I want to write their own js and front end, I'm going to write some more complex business in js
I hope I can like Java step debugging, could you tell me how to do this?

CodePudding user response:

 
If (Build) VERSION) SDK_INT & gt;=Build. VERSION_CODES. KITKAT) {
If (0!=(getApplicationInfo (). The flags & amp;=ApplicationInfo. FLAG_DEBUGGABLE)) {
WebView. SetWebContentsDebuggingEnabled (true);
}
}


Add the code above the WebView,
Allow remote debugging JS

CodePudding user response:

reference 1st floor moonFY response:
 
If (Build) VERSION) SDK_INT & gt;=Build. VERSION_CODES. KITKAT) {
If (0!=(getApplicationInfo (). The flags & amp;=ApplicationInfo. FLAG_DEBUGGABLE)) {
WebView. SetWebContentsDebuggingEnabled (true);
}
}


Add the code above the WebView,
Allow remote debugging JS

I'm in the AS asset. Js directory cannot be interrupted

CodePudding user response:

Sorry, I don't understand what is the remote invocation js
My web page and js are in local assets directory

CodePudding user response:

You need to have the development tools run js code, such as v code, debugging the js code, and then click on the corresponding need to debug the code in APP

CodePudding user response:

You can run after debugging js under the browser

CodePudding user response:

https://item.taobao.com/item.htm? SPM=a1z09. 2.0.0.358 c2e8dalj58S & amp; Id=582769112929
Taobao spent 15 yuan, with chrome, then point source
Now if the page couldn't breakpoint, when initialized to page load to breaking point
  • Related