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

Adobe AIR Development

Reply
Developer
Harry_Dodgson
Posts: 151
Registered: ‎10-26-2010
My Device: Bold 9900
My Carrier: AT&T

Command Line Debugger Issues

Hi,

 

I'm following the directions in the knowledge base...

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Compile-and-Debug-without-Flash-B...

 

...on my MacBook, using SDK release 0.9.2 and I get a dialog:

 

Debugger Connection Failed

Unable to connect to debugger at address N/A, enter correct host name or IP address or select cancel to continue without debugging.

 

Then I enter in the same IP as I have on the command line (my computer's static IP address) and click okay.  It continues and works.

 

Anyone else have this problem?

 

Harry

--------------
Accepted PlayBook Applications: Marmi-doos, BASIC, Run and Hide
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Command Line Debugger Issues

hey harry,

 

whats the exact command line you are using to debug your app? this line:

 

 

blackberry-airpackager -target bar-debug -connect [YOUR COMPUTER'S IP ADDRESS] -package HelloWorld.bar -installApp -launchApp HelloWorld-app.xml HelloWorld.swf [ICON FILE NAME] -device [PLAYBOOK IP ADDRESS] -password [SIMULATOR PASSWORD]

 

thanks!

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
Harry_Dodgson
Posts: 151
Registered: ‎10-26-2010
My Device: Bold 9900
My Carrier: AT&T

Re: Command Line Debugger Issues

 

This is my debug script:

 

#!/bin/csh

set PROJ = "mega"
set SDKBIN = "/opt/blackberry-tablet-sdk-0.9.2/bin"
set DEV = "172.16.198.131"
set DEB = "192.168.1.20"

set PNGS1 = "blackberry-tablet-icon.png icon1.png icon2.png icon3.png yinyang.png"
set PNGS2 = "panic.png menu.png restart.png sky.png oops.png trash.png"
set OTHER = "blackberry-tablet.xml docs.html"
set JPGS  = "back1.jpg back2.jpg back3.jpg peaceful.jpg title.jpg"

"$SDKBIN"/amxmlc -compiler.debug -compiler.optimize -compiler.strict "$PROJ".as
if ($? != 0) then
  exit -1
endif

open -a /Applications/Utilities/Terminal.app ./debug2 &

"$SDKBIN"/blackberry-airpackager -target bar-debug -connect "$DEB" -package "$PROJ".bar -installApp -launchApp "$PROJ"-app.xml "$PROJ".swf $OTHER $PNGS1 $PNGS2 $JPGS -device $DEV -password "well"

I can replace "$DEB" with the IP text - it doesn't change anything.

 

Harry

--------------
Accepted PlayBook Applications: Marmi-doos, BASIC, Run and Hide
Please use plain text.
Developer
shawnblais
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Command Line Debugger Issues

[ Edited ]

Yep I'm having the same issue, and my -connect string is definately valid. Chalking it up to a bug in blackberry-air-packager

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Command Line Debugger Issues

Harry, whatever machine is hosting this is probably not routing properly between the networks.  Try using addresses that are in the same network.  If your simulator is at 172.16.198.131 then the corresponding address on that network for your host machine is probably 172.16.198.1 (but you can confirm that by looking at the output of the command-line utility "ipconfig" (Windows) or "ifconfig" (Posix boxes).

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Harry_Dodgson
Posts: 151
Registered: ‎10-26-2010
My Device: Bold 9900
My Carrier: AT&T

Re: Command Line Debugger Issues

[ Edited ]

 

This is what I get while debug is running:

 

lo0: flags=8049 mtu 16384
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	inet 127.0.0.1 netmask 0xff000000 
gif0: flags=8010 mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863 mtu 1500
	ether 64:b9:e8:c0:3a:cc 
	media: autoselect
	status: inactive
en1: flags=8863 mtu 1500
	ether 04:1e:64:f3:55:73 
	inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255
	media: autoselect
	status: active
en2: flags=8863 mtu 1000
	ether 02:50:f2:00:00:01 
	media: autoselect
	status: inactive
vboxnet0: flags=8842 mtu 1500
	ether 0a:00:27:00:00:00 
vmnet1: flags=8863 mtu 1500
	ether 00:50:56:c0:00:01 
	inet 172.16.0.1 netmask 0xffffff00 broadcast 172.16.0.255
vmnet8: flags=8863 mtu 1500
	ether 00:50:56:c0:00:08 
	inet 172.16.198.1 netmask 0xffffff00 broadcast 172.16.198.255

 

EDIT: The dialog still comes up when I put 172.16.198.1 into the command, but it also works as well as my real IP address when I enter it into the dialog.

 

Harry

--------------
Accepted PlayBook Applications: Marmi-doos, BASIC, Run and Hide
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Command Line Debugger Issues

The set of network interfaces shouldn't change whether or not debug is running.  The one you likely need, same as the one I expected, is shown in the last line of your output there.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
creativebytes
Posts: 20
Registered: ‎02-05-2011
My Device: Not Specified

Re: Command Line Debugger Issues

I can not get this to work.  Im trying all the ip addresses shown on the ifconfig log.  Tried on a wired and wireless network, and i just get the unable to connect message. This is really not helping me port over a big project :smileysad:

 

Did anybody get this to work?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Command Line Debugger Issues

@creativebytes, I use debugging constantly, to monitor my trace() outputs.  No problems.

 

If you're having troubles, and have read over and understood the basic network setup issues described in this and other threads, post some information here with details of your setup.  Don't make us guess what the problem might be.  Start by describing something like IP addresses of the simulator and your host, whether you're trying to debug on the same machine you install apps from or another, is dev mode enabled, etc...  If you miss something, we can ask about it.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
shawnblais
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Command Line Debugger Issues

[ Edited ]

I have the same issue and it has nothing to do with network issues, if I type the value into the dialog I can connect, however it will never auto connect to the ip I provided in my command.

 

My command looks something like:

blackberry-tablet-sdk-0.9.2\bin\blackberry-airpackager.bat
-target bar-debug
-package ${project_name}.bar
-connect 10.0.1.8
-installApp
-launchApp
${project_name}-app.xml
${project_name}.swf
assets/bitmaps/splashScreen.png
assets/bitmaps/icon_90.png
blackberry-tablet.xml
-device 10.0.1.230
-password *****
    
Should work...?
I always get the error dialog "Could not connect to ip: NA" or something like that.

 

Please use plain text.