Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 16
Registered: ‎07-26-2012
My Device: PlayBook, Dev Alpha
My Carrier: Heyah

Tracking application logs.

How to view logs produced by my app to stdout or stderr on Dev Alpha ?

I'm using Visual Studio and Visual Studio plugin to deploy an app.

 

Till now I had tried this :

 

G:\BlackBerryDevelopment\bbndk\host_10_0_9_52\win32\x86\usr\bin>ssh -l devuser 169.254.0.1
The authenticity of host '169.254.0.1 (169.254.0.1)' can't be established.
RSA key fingerprint is 86:2f:ec:5e:bc:11:14:eb:e3:50:37:f4:b7:ac:91:3f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '169.254.0.1' (RSA) to the list of known hosts.
Permission denied (publickey,keyboard-interactive).

 

G:\BlackBerryDevelopment\bbndk\host_10_0_9_52\win32\x86\usr\bin>ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): id_rsa
id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
db:64:35:2e:7b:33:25:9c:d7:64:5c:61:ca:b4:7e:d0 MrKaktus@Quad266ghz
The key's randomart image is:

+--[ RSA 4096]----+
| . oo|
| o =..|
| o= E+|
| +.o.+ |
| S + =.o..|
| = o +. |
| . o + |
| . o |
| |
+-----------------+

 

G:\BlackBerryDevelopment\bbndk\host_10_0_9_52\win32\x86\usr\bin>blackberry-conne
ct 169.254.0.1 -password [here my proper pswd]
Info: Connecting to target 169.254.0.1:4455
Error: Connection failed: connect timed out

 

G:\BlackBerryDevelopment\bbndk\host_10_0_9_52\win32\x86\usr\bin>ssh -l devuser 1
69.254.0.1
Permission denied (publickey,keyboard-interactive).

 

I'm doing all of this when my app is deployed and running.

i have Dev Alpha with enabled wirelless and it is connected through USB also.

 

Can somebody guide me through, how RSA keys are installed on Dev Alpha, how they can be wiped out to install the new ones, and most important how to get my logs from it?

I'm beginner in BB stuff and I would really apreciate some logs Smiley Happy.

 

Thanks,

Karol

 

Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Tracking application logs.

There is a handy terminal window built in to Momentics. You can even use the target filesystem navigator to open up the log files on the Dev Alpha in an edit window. Both can be reached via Window->Show View. You can still use Visual Studio to compile & run your app of course.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
New Developer
Posts: 16
Registered: ‎07-26-2012
My Device: PlayBook, Dev Alpha
My Carrier: Heyah

Re: Tracking application logs.

I think it should do as a temporary WA, but I hope that every error or issue related to Visual Studio Plugin won't be always solved by saing that "In Momentics...". Also stepping through code after breaking on debug breakpoint in simplest code example in VS doesn't work :/. I hope that this plugin will be solved in beta 4.

 

Still, if somebody knows how command line tools works and knows the answear to my question it would be great Smiley Happy

 

New Developer
Posts: 16
Registered: ‎07-26-2012
My Device: PlayBook, Dev Alpha
My Carrier: Heyah

Re: Tracking application logs.

After updating to:

BlackBerry 10 v1103

beta4 NDK

Visual Studio v0.3

 

When I'm going in momentics to :

Window > Target File System Navigator

In path:

USB > System > accounts > 1000 > 

"appdata"

is no longer a folder!

Now it is of type "N/A" and the permission to it is DENIED!

 

So I cannot wath logs of my app when I'm deploying it using VS plugin even having Momentics as a backup.

 

Is there any other way to view logs from the application ?

How to properly connect to Dev Alpha device using SSH connection ?

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Tracking application logs.

For beta 4 momentics see this http://supportforums.blackberry.com/t5/Cascades-Development/Beta4-TargetFileSystemNavigator-problems...

 

ssh into dev alpha, app must be signed with valid debug token:

 

ssh-keygen -b 4096 -t rsa

blackberry-connect DEVICEIP \
-password DEVICEPASSWD \
-sshPublicKey ~/.ssh/id_rsa.pub

and leave it running!
ssh devuser@DEVICEIP