| Line 1: | Line 1: | ||
In Qt Creator you setup MeeGo device configurations to deploy your application to either a real hardware device or to a virtual machine, such as QEMU, running on your host. Qt Creator treats these configurations in the same way. When you start to debug your application Qt Creator will package your applications as an RPM, deploy it to the device you've selected in your project settings, install it, and run the executable. The mad-developer package must be installed on the target OS. | In Qt Creator you setup MeeGo device configurations to deploy your application to either a real hardware device or to a virtual machine, such as QEMU, running on your host. Qt Creator treats these configurations in the same way. When you start to debug your application Qt Creator will package your applications as an RPM, deploy it to the device you've selected in your project settings, install it, and run the executable. The mad-developer package must be installed on the target OS. | ||
| - | + | Steps to start debugging an application: | |
<ol> | <ol> | ||
<li>Create one or more MeeGo Device Configurations</li> | <li>Create one or more MeeGo Device Configurations</li> | ||
<li>Select one of the configurations for the current project</li> | <li>Select one of the configurations for the current project</li> | ||
<li>Start the device (boot the hardware or virtual machine)</li> | <li>Start the device (boot the hardware or virtual machine)</li> | ||
| - | <li>Start debugging the application | + | <li>(Optional) Set breakpoints in your code</li> |
| + | <li>Start debugging the application</li> | ||
</ol> | </ol> | ||
=== 1. Create MeeGo Device Configurations === | === 1. Create MeeGo Device Configurations === | ||
Open ''Tools'' > ''Options'' > ''Projects'' > ''MeeGo Device Configurations'' | Open ''Tools'' > ''Options'' > ''Projects'' > ''MeeGo Device Configurations'' | ||
| - | |||
<table> | <table> | ||
<tr><td valign="top"> | <tr><td valign="top"> | ||
| - | '''Create a | + | '''Create a hardware device configuration:''' |
# In the dialog box, create a new Device Configuration by clicking on '''Add'''. | # In the dialog box, create a new Device Configuration by clicking on '''Add'''. | ||
# Give the new Device Configuration a name in the Configuration Name text field, and add the following settings in the other test fields: | # Give the new Device Configuration a name in the Configuration Name text field, and add the following settings in the other test fields: | ||
| - | #* Device type: | + | #* Device type: Remote device |
#* Authentication type: Password | #* Authentication type: Password | ||
| - | #* Host name: | + | #* Host name: <IP Address of remote device> |
#* Ports, SSH: 6666 | #* Ports, SSH: 6666 | ||
#*: Note that the emulator is setup with a redirect from port 6666 on localhost to the SSH port (22) of the emulated device. | #*: Note that the emulator is setup with a redirect from port 6666 on localhost to the SSH port (22) of the emulated device. | ||
#* Ports, Gdb Server: 13219 (the default) | #* Ports, Gdb Server: 13219 (the default) | ||
#: '''Note:''' If this port is not free, you can select another one. | #: '''Note:''' If this port is not free, you can select another one. | ||
| - | #* Connection Timeout: | + | #* Connection Timeout: 30 |
#* User Name: root | #* User Name: root | ||
#* Password: meego | #* Password: meego | ||
# Click '''Apply''' | # Click '''Apply''' | ||
| - | + | </td> | |
| - | + | <td valign="top">[[File:Qt-config-device-config.jpg|thumb|500px]]</td> | |
</tr> | </tr> | ||
</table> | </table> | ||
<table> | <table> | ||
| - | <tr><td> | + | <tr><td valign="top"> |
| - | '''Create a | + | '''Create a QEMU virtual machine device configuration:''' |
# In the dialog box, create a new Device Configuration by clicking on '''Add'''. | # In the dialog box, create a new Device Configuration by clicking on '''Add'''. | ||
# Give the new Device Configuration a name in the Configuration Name text field, and add the following settings in the other test fields: | # Give the new Device Configuration a name in the Configuration Name text field, and add the following settings in the other test fields: | ||
| - | #* Device type: | + | #* Device type: MeeGo emulator |
#* Authentication type: Password | #* Authentication type: Password | ||
| - | #* Host name: | + | #* Host name: 127.0.0.1 |
#* Ports, SSH: 6666 | #* Ports, SSH: 6666 | ||
#*: Note that the emulator is setup with a redirect from port 6666 on localhost to the SSH port (22) of the emulated device. | #*: Note that the emulator is setup with a redirect from port 6666 on localhost to the SSH port (22) of the emulated device. | ||
#* Ports, Gdb Server: 13219 (the default) | #* Ports, Gdb Server: 13219 (the default) | ||
#: '''Note:''' If this port is not free, you can select another one. | #: '''Note:''' If this port is not free, you can select another one. | ||
| - | #* Connection Timeout: | + | #* Connection Timeout: 30s |
#* User Name: root | #* User Name: root | ||
#* Password: meego | #* Password: meego | ||
# Click '''Apply''' | # Click '''Apply''' | ||
| - | + | </td> | |
| - | + | <td valign="top">[[File:sdk-docs-QtCreator-configuring-emulator-access.png|thumb|500px]]</td> | |
</tr> | </tr> | ||
</table> | </table> | ||
'''Test the settings''' <br> | '''Test the settings''' <br> | ||
| - | + | To test the settings, ensure that the emulated device is running, then click '''Test'''. | |
| - | + | If successful, you'll see a dialog box with the message "Device configuration successful". | |
| - | + | If the message "Could not connect to host" is displayed, check your setting selections and make sure that the network is connected. | |
=== 2. Select one of the configurations for the current project === | === 2. Select one of the configurations for the current project === | ||
| Line 102: | Line 102: | ||
=== 4. Start debugging the application === | === 4. Start debugging the application === | ||
| + | Qt Creator deploys and starts the application on the remote system or virtual machine. You can view/step-through the code in the IDE while your application runs on the remote device or virtual machine. | ||
In Qt Creator you setup MeeGo device configurations to deploy your application to either a real hardware device or to a virtual machine, such as QEMU, running on your host. Qt Creator treats these configurations in the same way. When you start to debug your application Qt Creator will package your applications as an RPM, deploy it to the device you've selected in your project settings, install it, and run the executable. The mad-developer package must be installed on the target OS.
Steps to start debugging an application:
Contents |
Open Tools > Options > Projects > MeeGo Device Configurations
|
Create a hardware device configuration:
|
|
Create a QEMU virtual machine device configuration:
|
Test the settings
To test the settings, ensure that the emulated device is running, then click Test.
If successful, you'll see a dialog box with the message "Device configuration successful".
If the message "Could not connect to host" is displayed, check your setting selections and make sure that the network is connected.
- sudo mkdir /usr/lib/qtbak
- sudo mv /usr/lib/libQt* /usr/lib/qtbak
Qt Creator deploys and starts the application on the remote system or virtual machine. You can view/step-through the code in the IDE while your application runs on the remote device or virtual machine.