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)
39 ## Connecting Stagehand to your DALi application
43 Stagehand connects to DALi via network using a TCP/IP connection, to enable this, your dali-adaptor RPM must be built with a configure option: `--enable-networklogging`
45 Here is an example dali-adaptor configure line:
47 $ CXXFLAGS="-g -O0 -Wno-unused-local-typedefs" CXX="ccache g++" ./configure --prefix=$DESKTOP_PREFIX --enable-debug=yes --enable-profile=UBUNTU --enable-networklogging
50 Once this RPM is installed, you can run your DALi application and connect Stagehand to it.
55 To enable network control on DALi, an environment variable must be set:
58 $ export DALI_NETWORK_CONTROL=1 to enable
60 Or run the application with the variable set.
62 $ DALI_NETWORK_CONTROL=1 /usr/apps/com.samsung.dali-demo/bin/dali-demo
65 Check what network port the application is using. It will be from port 3031 onwards.
67 If running DALi on desktop, just type netstat -tlnp. On Tizen log into the device and run netstat. E.g.
74 ![ ](../assets/img/stage-hand/netstat.png)
78 ### Connecting with Stagehand
80 Click the settings icons below
82 ![ ](../assets/img/stage-hand/stagehand-settings.png)
83 ![ ](stagehand-settings.png)
86 ### Connecting to DALi running on Tizen
88 Here we are connecting to a device running SDB
90 ![ ](../assets/img/stage-hand/stagehand-tizen-connection.png)
91 ![ ](stagehand-tizen-connection.png)
93 ### Connect to DALi running on Desktop ( Ubuntu )
95 ![ ](../assets/img/stage-hand/stagehand-ubuntu-connection.png)
96 ![ ](stagehand-ubuntu-connection.png)
100 Click Refresh to load the current scene from the device.
102 ![ ](../assets/img/stage-hand/stagehand-refesh.png)
103 ![ ](stagehand-refesh.png)
105 Click screen shot to get overlay current screen
107 ![ ](../assets/img/stage-hand/stagehand-screenshot.png)
108 ![ ](stagehand-screenshot.png)
110 To cycle through the actor hierarchy, keep clicking the same spot. Alternatively, select using the actor tree.
113 ![ ](../assets/img/stage-hand/stagehand-mainscreen.png)
114 ![ ](stagehand-mainscreen.png)
117 Click the save icon to save the scene
119 ![ ](../assets/img/stage-hand/stagehand-save.png)
120 ![ ](stagehand-save.png)
124 ![ ](../assets/img/stage-hand/stagehand-zoom.png)
125 ![ ](stagehand-zoom.png)
129 ![ ](../assets/img/stage-hand/stagehand-modify.png)
130 ![ ](stagehand-modify.png)
132 ## Performance monitoring
134 To enable performance option. Edit
136 ~/.stagehand/stagehand.ini
140 Restart application. Click performance
142 ![ ](../assets/img/stage-hand/stagehand-performance.png)
143 ![ ](stagehand-performance.png)
147 You can manually check the network is enabled on the DALi application using netcat.
149 In the example below we are connecting to a Tizen device using SDB port forwarding.
151 After running nc localhost 3031 we type help
153 ![ ](../assets/img/stage-hand/stagehand-netcat.png)
154 ![ ](stagehand-netcat.png)
160 If you can't connect to a DALi application, but using netstat you can see a port is open.
162 Check the smack log for errors:
164 tail -f -n 10 /var/log/audit/audit.log | grep 'internet'
167 If it is being blocked, you temporarily enable it by editing:
170 /etc/smack/accesses2.d/ your-app-name
172 then add: system::user_internet …..app-name rw
174 ## Tizen Emulator connection problem
177 Make sure DALi application is run using launch_app:
179 launch_app [APP_ID] __AUL_SDK__ DEBUG __DLP_DEBUG_ARG__ :10003
182 @class _Guide_Visual_Debugger