3 # Stagehand Visual Debugger for DALi {#stagehand}
5 ![ ](../assets/img/stage-hand/blocks.png)
10 Stagehand is an open source tool that allows a developer to:
12 - Connect to a DALi application running on:
15 - View a wireframe of the current scene on top of a screen shot
16 - Modify properties in the scene
17 - Monitor performance of the application
20 Full source code is available from http://github.com/gamoeba/stagehand.git
22 Stagehand is released under the Apache 2 licence.
24 ## Installing StageHand on Ubuntu
26 http://www.gamoeba.com/stagehand/
28 Install both files on the website. Start with the QT dependencies first.
33 Stagehand connects to DALi via the network using a TCP/IP connection.
35 ![ ](../assets/img/stage-hand/inner-workings.png)
36 ![ ](inner-workings.png)
40 To enable network control on DALi, an environment variable must be set:
43 $ export DALI_NETWORK_CONTROL=1 to enable
45 Or run the application with the variable set.
47 $ DALI_NETWORK_CONTROL=1 /usr/apps/com.samsung.dali-demo/bin/dali-demo
50 Check what network port the application is using. It will be from port 3031 onwards.
52 If running DALi on desktop, just type netstat -tlnp. On Tizen log into the device and run netstat. E.g.
59 ![ ](../assets/img/stage-hand/netstat.png)
63 ## Connecting with Stagehand
65 Click the settings icons below
67 ![ ](../assets/img/stage-hand/stagehand-settings.png)
68 ![ ](stagehand-settings.png)
71 ### Connecting to DALi running on Tizen
73 Here we are connecting to a device running SDB
75 ![ ](../assets/img/stage-hand/stagehand-tizen-connection.png)
76 ![ ](stagehand-tizen-connection.png)
78 ### Connect to DALi running on Desktop ( Ubuntu )
80 ![ ](../assets/img/stage-hand/stagehand-ubuntu-connection.png)
81 ![ ](stagehand-ubuntu-connection.png)
85 Click Refresh to load the current scene from the device.
87 ![ ](../assets/img/stage-hand/stagehand-refesh.png)
88 ![ ](stagehand-refesh.png)
90 Click screen shot to get overlay current screen
92 ![ ](../assets/img/stage-hand/stagehand-screenshot.png)
93 ![ ](stagehand-screenshot.png)
95 To cycle through the actor hierachy, keep clicking the same spot. Alternatively, select using the actor tree.
98 ![ ](../assets/img/stage-hand/stagehand-mainscreen.png)
99 ![ ](stagehand-mainscreen.png)
102 Click the save icon to save the scene
104 ![ ](../assets/img/stage-hand/stagehand-save.png)
105 ![ ](stagehand-save.png)
109 ![ ](../assets/img/stage-hand/stagehand-zoom.png)
110 ![ ](stagehand-zoom.png)
114 ![ ](../assets/img/stage-hand/stagehand-modify.png)
115 ![ ](stagehand-modify.png)
117 ## Performance monitoring
119 To enable performance option. Edit
121 ~/.stagehand/stagehand.ini
125 Restart application. Click performance
127 ![ ](../assets/img/stage-hand/stagehand-performance.png)
128 ![ ](stagehand-performance.png)
132 You can manually check the network is enabled on the DALi application using netcat.
134 In the example below we are connecting to a Tizen device using SDB port forwarding.
136 After running nc localhost 3031 we type help
138 ![ ](../assets/img/stage-hand/stagehand-netcat.png)
139 ![ ](stagehand-netcat.png)
145 If you can't connect to a DALi application, but using netstat you can see a port is open.
147 Check the smack log for errors:
149 tail -f -n 10 /var/log/audit/audit.log | grep 'internet'
152 If it is being blocked, you temporarily enable it by editing:
155 /etc/smack/accesses2.d/ your-app-name
157 then add: system::user_internet …..app-name rw
159 ## Tizen Emulator connection problem
162 Make sure DALi application is run using launch_app:
164 launch_app [APP_ID] __AUL_SDK__ DEBUG __DLP_DEBUG_ARG__ :10003
167 @class _Guide_Visual_Debugger