语言

Menu
Sites
Language
Emulator Debugger woes

I have been trying to use the ide's debugger, but keep having various problems.

First, I have built the cairo-basic sample project (for W-3.0 circle). I can run it successfully - the emulator appears, boots, and my app is loaded and will run, then terminate (after clicking/holding on the bottom button and powering off).  But if I try to debug the app (rather than run it), I get these problems:

The first time I start the debugger, the emualtor launches, boots, and the app gets loaded. The ide debugger hits the breakpoint at main(). I have set breakpoints at the other app_xxx  callbacks (create, terminate, pause, resume, and control), as well as a few other spots. It calls app_create (which calls the drawing routines), then app_control (which calls the win_resize callback, then app_resume, and the app gets displayed. After a few minutes, the display darkens, and app_pause gets called. Clicking the bottom button calls app_resume, and the display is redrawn. Clicking on the top button, app_pause is called, and the display goes back to the main watch display. Clicking the bottom button, I get the list of apps, but when I click on my app, nothing happens. None of the app_xxx functions get called, and so the app never gets displayed (it stays on the list of apps screen). I then click/hold the bottom button, and terminate the emulator, but still no app_xxx gets called - in particular, app_terminate - and in the debugger console I get "Exception condition detected on fd 772", and the debugger terminates.

Now, I launch the debugger again, the emulator launches, but the debugger times out trying to connect to the emulator (progress gets to 89%). I try to run the debugger again, and it immediately pops up an error box saying "Problem occurred while launching a emulator". In the workspace/.metatdata/.log file, the last lines are this:

!ENTRY org.tizen.common.connection.toolbar.TargetToolBarManager 4 0 2017-01-31 11:08:37.391
!MESSAGE [2017.01.31 11:08:37][ERROR] TargetToolBarManager.java(384) - Failed to get VM property


!ENTRY org.tizen.common.connection 4 0 2017-01-31 11:08:37.407
!MESSAGE Problem occurred while launching a emulator.

 

The only way to reset things to get the debugger and emulator to run is to restart the ide. Then I am back to where I was to started with.

Sometimes, after the debugger terminates, the emulator window won't close (even pressing the bottom button doesn't show the poweroff menu).Only way to close that window is the use the task manager to terminate the emulator process.

 

Any ideas? Please?

 

TIA

ken

 

 

 

 

响应

2 回复
Yasin Ali

Hi~,

As far as I know Watch Applications can't be launched by the Debug As option.

Please have a look at the attached screenshot.

http://imgur.com/a/e3NiN


In that case you can print log messages and see them in the IDE Log view. While the application is running, the IDE Log view shows the log, debug, and 
exception messages from the methods defined in the log macros.

Use the code below for dlog print:

dlog_print(DLOG_INFO, TAG , MESSAGE);

Hope it will work.
If you find my post is helpful , please mark it as the Best Answer to promote this post to others.

bac

Thanks for the reply.

 

"Watch Applications" can't be debugged, but AFAIK, those are only apps which are "watches"; rather than apps that run on the circle/watch emulator. Also, I did try using the M-3.0 emulator as well: same results.

 

Also, I did use the "dlog_print" code to use as traces through various functions. That also showed that the app_xxx functions were not being called.

 

Thanks again,

 

ken