4 # Stagehand Visual Debugger for DALi {#stagehand}
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 ![ ](inner-workings.png)
37 ## Connecting Stagehand to your DALi application
41 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`
43 Here is an example dali-adaptor configure line:
45 $ CXXFLAGS="-g -O0 -Wno-unused-local-typedefs" CXX="ccache g++" ./configure --prefix=$DESKTOP_PREFIX --enable-debug=yes --enable-profile=UBUNTU --enable-networklogging
48 Once this RPM is installed, you can run your DALi application and connect Stagehand to it.
53 To enable network control on DALi, an environment variable must be set:
56 $ export DALI_NETWORK_CONTROL=1 to enable
58 Or run the application with the variable set.
60 $ DALI_NETWORK_CONTROL=1 /usr/apps/com.samsung.dali-demo/bin/dali-demo
63 Check what network port the application is using. It will be from port 3031 onwards.
65 If running DALi on desktop, just type netstat -tlnp. On Tizen log into the device and run netstat. E.g.
75 ### Connecting with Stagehand
77 Click the settings icons below
79 ![ ](stagehand-settings.png)
82 ### Connecting to DALi running on Tizen
84 Here we are connecting to a device running SDB
86 ![ ](stagehand-tizen-connection.png)
88 ### Connect to DALi running on Desktop ( Ubuntu )
90 ![ ](stagehand-ubuntu-connection.png)
94 Click Refresh to load the current scene from the device.
96 ![ ](stagehand-refesh.png)
98 Click screen shot to get overlay current screen
100 ![ ](stagehand-screenshot.png)
102 To cycle through the actor hierarchy, keep clicking the same spot. Alternatively, select using the actor tree.
105 ![ ](stagehand-mainscreen.png)
108 Click the save icon to save the scene
110 ![ ](stagehand-save.png)
114 ![ ](stagehand-zoom.png)
118 ![ ](stagehand-modify.png)
120 ## Performance monitoring
122 To enable performance option. Edit
124 ~/.stagehand/stagehand.ini
128 Restart application. Click performance
130 ![ ](stagehand-performance.png)
134 You can manually check the network is enabled on the DALi application using netcat.
136 In the example below we are connecting to a Tizen device using SDB port forwarding.
138 After running nc localhost 3031 we type help
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