11-24-2012 03:16 AM
I setup remote debugging with the BB10 simulator this morning and I found the documentation for that just incoherent, and incomplete enough. That I thought I'd make a quick note here about some of the steps.
- First you will want make you *.bar file with the debugging flag tuned on. It's the -d option when one invokes bbwp and the command looks something like
- with that done one can deploy to the alpha simulator with commands like:
java -Xmx512M -jar BarDeploy.jar -installApp -device 172.16.129.128 -package /home/marco/workspace/mobileweb/rim/simulator/myap
Your simulator addess and directory paths will naturally vary. Get the simulator address from the bottom of the simulator window.
- Next boot your app in the simulator and a dialog box titled "Web Inspector Enabled", will pop up along with your apps home screen. The documenation implies that this dialog will present a url which you can connect to with webkit browser for debugging, but if your experience follows mine you will notice that the dialog contents are blank.
- To find the remote address to connect your browser to, telnet into the alpha simulator using the address at the bottom to the simulator screen. For me this is
> telnet 172.16.129.128
Enter the username: devuser and pasword: devuser to connect. Then from the command line enter the command
and you will get output like:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 172.16.129.128.telnet 172.16.129.1.58729 ESTABLISHED
tcp 0 0 172.16.129.128.64991 mia04s05-in-f15..http CLOSE_WAIT
tcp 0 0 172.16.129.128.64992 22.214.171.124.http CLOSE_WAIT
tcp 0 0 172.16.129.128.64993 nuq04s09-in-f4.1.http CLOSE_WAIT
tcp 0 0 172.16.129.128.64994 nuq04s07-in-f15..http CLOSE_WAIT
tcp 0 0 172.16.129.128.64996 nuq04s07-in-f15..http CLOSE_WAIT
tcp 0 0 172.16.129.128.64997 pd-in-f95.1e100..http CLOSE_WAIT
tcp 0 0 *.1337 *.* LISTEN
tcp 0 0 172.16.129.128.65525 pb-in-f193.1e100.https ESTABLISHED
tcp 0 0 172.16.129.128.https *.* LISTEN
tcp 0 0 172.16.129.128.http *.* LISTEN
tcp 0 0 *.4455 *.* LISTEN
tcp 0 0 *.11811 *.* LISTEN
In my particular case the debugging port is listed by the line
tcp 0 0 *.1337 *.* LISTEN
The port on your simulator may vary but it will have the same general format. Use the format guide and experiment with your choices.
- Lastly, with a port, bring up a browser like chrome and, in the address bar, type in the simulator address and the port number that you picked off of the netstat output. For me I type the address:
That will get you to a home page which will present 3 or more applications to debug --- just click on your application in the list and your remote debug session will start up.
So there you go. Debugging is fundamental enough to product that we shouldnt have to figure it out for ourselves but until proper documenation appears --- that's what I have found.