4 # Stagehand Visual Debugger for DALi {#stagehand}
6 
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 
37 
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 
64 ## Connecting with Stagehand
66 Click the settings icons below
68 
69 
72 ### Connecting to DALi running on Tizen
74 Here we are connecting to a device running SDB
76 
77 
79 ### Connect to DALi running on Desktop ( Ubuntu )
81 
82 
86 Click Refresh to load the current scene from the device.
88 
89 
91 Click screen shot to get overlay current screen
93 
94 
96 To cycle through the actor hierachy, keep clicking the same spot. Alternatively, select using the actor tree.
99 
100 
103 Click the save icon to save the scene
105 
106 
110 
111 
115 
116 
118 ## Performance monitoring
120 To enable performance option. Edit
122 ~/.stagehand/stagehand.ini
126 Restart application. Click performance
128 
129 
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 
140 
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