← Back to team overview

ubuntu-phone team mailing list archive

Re: Launching applications within GDB

 

Hi

On Thursday 24 October 2013 03:11:25 Mike Sheldon wrote:
>  I'm currently in the process of attempting to create a port of MeeSpot
> (a MeeGo spotify client) for Ubuntu Touch,

Yay! Have been using that it on the N9 quite a bit :) Looking forward to your 
port.

> however while it runs fine on
> my desktop it's crashing at launch when executed on the phone. It'd be
> very helpful if I could run the application within gdb to see what's
> going on, however attempting to launch any application from a terminal
> on the phone (rather than going through the graphical launcher) results
> in the error: "QUbuntu: Could not create application instance".
> 
>  What's the correct way to launch an Ubuntu Touch application within
> GDB?
> 

I think you're missing the --desktop_file_hint argument. You must pass a 
.desktop file with each binary to tell Ubuntu to which application it belongs.

./myapp --desktop_file_hint=/absolute/path/to/a/file.desktop


If it still crashes, you should be able to run it in gdb like this. ssh into 
your phone and start up gdb with your binary:

gdb /path/to/binary

when gdb is loaded, run it providing the --desktop_file_hint argument:

r --desktop_file_hint=/path/to/file.desktop

After that, use gdb as usual.

Hope this helps,
Michael


Follow ups

References