Should this info go in the BB10 platform docs in cordova-docs? On May 26, 2014, at 11:09 AM, Martin Gonzalez Glez <[email protected]> wrote:
> Yes agree, Momentics simplifies the process of course. > This process it's aimed in the case that only Webworks it's available, or > for those who does not use Momentics. > > Thanks Bryan. > > > 2014-05-26 8:12 GMT-05:00 Bryan Higgins <[email protected]>: > >> Thanks for the write-up Martin! >> >> For most Cordova devs WebInspector will be sufficient, but for plugin >> development or performance tuning it can be useful to view the native >> device logs. >> >> Momentics IDE greatly simplifies this process. Just click "Open Device >> Logs" from the "Target Navigator" >> >> >> On Fri, May 23, 2014 at 5:38 PM, Martin Gonzalez Glez < >> [email protected]> wrote: >> >>> Deploying Blackberry 10 apps, I realize that it is possible to view the >>> events on the device or emulator without the IDE usage. >>> >>> This can be an useful stuff to* debug any Cordova App*. >>> >>> *Requirements:* >>> -Command line tools from the Native SDK or the tools from the BB10 >> WebWorks >>> SDK (1.0 or 2.0). >>> -Client SSH (PuTTY, Open SSH, Free SSH or any other). >>> -Platform irrelevant. >>> -Device or Simulator. >>> >>> First at all, it is required create a public and private RSA 4096 key, to >>> do use the SSH client to create it. >>> >>> *ssh-keygen -t rsa -b 4096* >>> >>> Set a name and path, then a passphrase, then it will be stored. >>> Note: Windows user default path: %USERPROFILE%\.ssh\, here's where the >> ssh >>> tools looks first. >>> >>> Then, connect your device or start the simulator, and activate the >>> Development Mode at Settings, set a password and check for the IP >> provided. >>> >>> *Create a secure connection with the device:* >>> >>> ToolsDir= >>> >>> - C:\Program Files\BlackBerry\BB10 WebWorks SDK >>> 2.0.0.71\cordova-blackberry\bin\dependencies\bb-tools\bin >>> - C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK >>> 1.0.4.11\dependencies\tools\bin >>> - Native SDK bin path with the tools. >>> >>> Any of above paths should do the work, you can add any of those to the >> PATH >>> variable or add it temporally in the current command prompt/shell. >>> >>> Type: >>> >>> *blackberry-connect [ip] -password [password-device] -sshPublicKey >>> [path-to-the-key]* >>> >>> Example: >>> >>> *blackberry-connect 169.254.0.1 -password bbpass11 -sshPublicKey >>> %USERPROFILE%/.ssh/id_rsa.pub* >>> >>> Note: The IP it is provided when you activate the development mode in >>> settings. >>> If you are using the simulator provide the ip located at the *south-left >>> corner*, otherwise it's not going to work. >>> >>> If the connection fails, check: >>> >>> - Development mode setting >>> - Settings --> Storage --> USB connection >>> - No other blackberry-connect command-line tool is already connected. >>> - Is not connected by the IDE. >>> >>> >>> After the successful connected message, open a new command prompt/shell, >>> and connect to the device with the SSH client. >>> >>> Type: >>> *ssh devuser@IPDEVICE -i path-to-the/id_rsa* >>> >>> Example: >>> PWD = C:/Users/admin >>> >>> *ssh [email protected] <[email protected]> -i .ssh\id_rsa* >>> >>> This time we are providing the private key to connect with the device. If >>> everything went just fine, we are in a ssh connection with the device, we >>> can explore the device storage content. >>> >>> Type to start to view logging events: >>> >>> *slog2info -w* >>> >>> Now you have devuser access to the device, and availability to view all >>> events related with the applications installed in the device, similar to >>> log cat from android. >>> >>> >>> Type: >>> >>> *slog2info -h * >>> >>> In order to check all options. >>> Keep both command prompt windows opened. >>> >>> Well, this is what I found, there you have the how to do it, the workflow >>> can be followed to debug any app, and it can used to quickly and easy >> view >>> the events on the native side, how your app behaves in there. >>> >>> RIM folks, is there any other alternative, besides of the IDE usage? or >> how >>> are you guys doing this? >>> >>> Regards, >>> Martin. >>> >>
