+ 2
Any way to debug JavaScript by stepping line-by-line on mobile phone?
I mean... (1) on device, ie. on the phone, not on desktop, (2) an app or workaround instead of manually inserting console.log(), alert() etc. (3) without a live connection to a desktop computer. I only found apps that print the final output or generic errors, not specifying where was the error generated.
8 Respuestas
+ 2
I found this, maybe it helps
https://scottiestech.info/2019/06/04/how-to-debug-javascript-on-mobile-devices/
+ 2
Use Chrome devTools, add debugger statement for break points or set breakpoints from devTools.
More info please check https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints
Chrome devTools can be used on mobile webpage debugging too. Please check it out https://developers.google.com/web/tools/chrome-devtools/remote-debugging
+ 2
https://jsbin.com/help/features/
jsbin seems to have some sort of debug feature but I am not sure how it works.
+ 1
Thanks for the article. Unfortunately, this method requires inserting a script in the html every time before debugging. Tibor Santa
+ 1
Finally I’ve found an interesting mobile console that executes commands and gives feedback:
https://jsconsole.com/
Session ID can also be used on desktop computer:
https://coderwall.com/p/cvstug/debugging-javascript-errors-on-ios-android-and-other-mobile-devices
https://youtu.be/Y219Ziuipvc
+ 1
FYI: After trying jsconsole.com on mobile,I am disappointed with it.
1. It is not responsive enough (you have to zoom and scroll after each running session).
2. It doesn’t accept the quotation mark (“ or ‘) from my mobile keyboard at all and stops running. It should be automatically recognized and replaced with " which is not built in my mobile keyboard (I can only copy and paste it from the web).
Apps like JS Console Run does this replace (despite of other missing features).
So if anyone knows a solution for mobile js debugging on device, without another computer please post it!
+ 1
Tibor Santa I tried it and at first sight it seems to run smoothly on mobile. I’ll test it in the following days more thoroughly. Thanks, Tibor!! Have a great day!
0
Calviղ Thanks for the idea and links! Specifically, I’m looking for any way to debug ON DEVICE, ie. on the phone itself, not on a desktop computer.