4 # Stagehand Visual Debugger for DALi {#stagehand}
6 ![ ](../assets/img/stage-hand/blocks.png)
11 Stagehand is an open source tool that allows a developer to:
13 - Connect to a DALi application running on:
16 - View a wireframe of the current scene on top of a screen shot
17 - Modify properties in the scene
18 - Monitor performance of the application
21 Full source code is available from http://github.com/gamoeba/stagehand.git
23 Stagehand is released under the Apache 2 licence.
25 ## Installing StageHand on Ubuntu
27 http://www.gamoeba.com/stagehand/
29 Install both files on the website. Start with the QT dependencies first.
34 Stagehand connects to DALi via the network using a TCP/IP connection.
36 ![ ](../assets/img/stage-hand/inner-workings.png)
37 ![ ](inner-workings.png)
41 To enable network control on DALi, an environment variable must be set:
44 $ export DALI_NETWORK_CONTROL=1 to enable
46 Or run the application with the variable set.
48 $ DALI_NETWORK_CONTROL=1 /usr/apps/com.samsung.dali-demo/bin/dali-demo
51 Check what network port the application is using. It will be from port 3031 onwards.
53 If running DALi on desktop, just type netstat -tlnp. On Tizen log into the device and run netstat. E.g.
60 ![ ](../assets/img/stage-hand/netstat.png)
64 ## Connecting with Stagehand
66 Click the settings icons below
68 ![ ](../assets/img/stage-hand/stagehand-settings.png)
69 ![ ](stagehand-settings.png)
72 ### Connecting to DALi running on Tizen
74 Here we are connecting to a device running SDB
76 ![ ](../assets/img/stage-hand/stagehand-tizen-connection.png)
77 ![ ](stagehand-tizen-connection.png)
79 ### Connect to DALi running on Desktop ( Ubuntu )
81 ![ ](../assets/img/stage-hand/stagehand-ubuntu-connection.png)
82 ![ ](stagehand-ubuntu-connection.png)
86 Click Refresh to load the current scene from the device.
88 ![ ](../assets/img/stage-hand/stagehand-refesh.png)
89 ![ ](stagehand-refesh.png)
91 Click screen shot to get overlay current screen
93 ![ ](../assets/img/stage-hand/stagehand-screenshot.png)
94 ![ ](stagehand-screenshot.png)
96 To cycle through the actor hierachy, keep clicking the same spot. Alternatively, select using the actor tree.
99 ![ ](../assets/img/stage-hand/stagehand-mainscreen.png)
100 ![ ](stagehand-mainscreen.png)
103 Click the save icon to save the scene
105 ![ ](../assets/img/stage-hand/stagehand-save.png)
106 ![ ](stagehand-save.png)
110 ![ ](../assets/img/stage-hand/stagehand-zoom.png)
111 ![ ](stagehand-zoom.png)
115 ![ ](../assets/img/stage-hand/stagehand-modify.png)
116 ![ ](stagehand-modify.png)
118 ## Performance monitoring
120 To enable performance option. Edit
122 ~/.stagehand/stagehand.ini
126 Restart application. Click performance
128 ![ ](../assets/img/stage-hand/stagehand-performance.png)
129 ![ ](stagehand-performance.png)
133 You can manually check the network is enabled on the DALi application using netcat.
135 In the example below we are connecting to a Tizen device using SDB port forwarding.
137 After running nc localhost 3031 we type help
139 ![ ](../assets/img/stage-hand/stagehand-netcat.png)
140 ![ ](stagehand-netcat.png)
146 If you can't connect to a DALi application, but using netstat you can see a port is open.
148 Check the smack log for errors:
150 tail -f -n 10 /var/log/audit/audit.log | grep 'internet'
153 If it is being blocked, you temporarily enable it by editing:
156 /etc/smack/accesses2.d/ your-app-name
158 then add: system::user_internet …..app-name rw
160 ## Tizen Emulator connection problem
163 Make sure DALi application is run using launch_app:
165 launch_app [APP_ID] __AUL_SDK__ DEBUG __DLP_DEBUG_ARG__ :10003
168 @class _Guide_Visual_Debugger