Remove V8 plugin
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / stage-hand.md
1 <!--
2 /**-->
3
4 # Stagehand Visual Debugger for DALi {#stagehand}
5
6 ![ ](blocks.png)
7
8 ## Introduction
9
10 Stagehand  is an open source tool that allows a developer to:
11
12 - Connect to a DALi application running on:
13  - Tizen
14  - Ubuntu
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
18
19   
20 Full source code is available from http://github.com/gamoeba/stagehand.git
21
22 Stagehand is released under the Apache 2 licence.
23
24 ## Installing StageHand on Ubuntu
25
26 http://www.gamoeba.com/stagehand/
27
28 Install both files on the website. Start with the QT dependencies first.
29
30
31 ## How it works
32
33 Stagehand connects to DALi via the network using a TCP/IP connection.
34   
35 ![ ](inner-workings.png)
36
37 ## Connecting Stagehand to your DALi application
38
39 ### Preparing DALi
40
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`
42
43 Here is an example dali-adaptor configure line:
44 ~~~
45 $ CXXFLAGS="-g -O0 -Wno-unused-local-typedefs" CXX="ccache g++" ./configure --prefix=$DESKTOP_PREFIX --enable-debug=yes --enable-profile=UBUNTU --enable-networklogging
46 ~~~
47
48 Once this RPM is installed, you can run your DALi application and connect Stagehand to it.
49   
50
51 ### Network setup
52
53 To enable network control on DALi, an environment variable must be set:
54
55 ~~~
56 $ export DALI_NETWORK_CONTROL=1 to enable
57 ~~~
58 Or run the application with the variable set.
59 ~~~
60 $ DALI_NETWORK_CONTROL=1 /usr/apps/com.samsung.dali-demo/bin/dali-demo
61 ~~~
62
63 Check what network port the application is using. It will be from port 3031 onwards.
64   
65 If running DALi on desktop, just type netstat -tlnp. On Tizen log into the device and run netstat. E.g.
66 ~~~
67 $ su
68
69 $ netstat -tlpn
70 ~~~
71
72 ![ ](netstat.png)
73
74
75 ### Connecting with Stagehand
76
77 Click the settings icons below
78   
79 ![ ](stagehand-settings.png)
80
81
82 ### Connecting to DALi running on Tizen
83
84 Here we are connecting to a device running SDB
85   
86 ![ ](stagehand-tizen-connection.png)
87
88 ### Connect to DALi running on Desktop ( Ubuntu )
89   
90 ![ ](stagehand-ubuntu-connection.png)
91
92 ## Using Stagehand
93
94 Click Refresh to load the current scene from the device.
95   
96 ![ ](stagehand-refesh.png)
97
98 Click screen shot to get overlay current screen
99   
100 ![ ](stagehand-screenshot.png)
101
102 To cycle through the actor hierarchy, keep clicking the same spot. Alternatively, select using the actor tree.
103
104   
105 ![ ](stagehand-mainscreen.png)
106
107
108 Click the save icon to save the scene
109   
110 ![ ](stagehand-save.png)
111
112 Zooming in and out
113   
114 ![ ](stagehand-zoom.png)
115
116 Modifying the scene
117   
118 ![ ](stagehand-modify.png)
119
120 ## Performance monitoring
121
122 To enable performance option. Edit
123   
124 ~/.stagehand/stagehand.ini
125   
126 Set perfmode=on
127
128 Restart application. Click performance
129   
130 ![ ](stagehand-performance.png)
131
132 ## Trouble shooting
133
134 You can manually check the network is enabled on the DALi application using netcat.
135
136 In the example below we are connecting to a Tizen device using SDB port forwarding.
137   
138 After running nc localhost 3031 we type help
139   
140 ![ ](stagehand-netcat.png)
141
142
143 ## Tizen smack
144
145
146 If you can't connect to a DALi application, but using netstat you can see a port is open.
147   
148 Check the smack log for errors:
149 ~~~
150 tail -f -n 10 /var/log/audit/audit.log | grep 'internet'
151 ~~~
152
153 If it is being blocked, you temporarily enable it by editing:
154   
155 ~~~
156  /etc/smack/accesses2.d/ your-app-name
157
158 then add: system::user_internet …..app-name rw
159 ~~~
160 ## Tizen Emulator connection problem
161
162
163 Make sure  DALi application is run using launch_app:
164 ~~~
165 launch_app [APP_ID] __AUL_SDK__ DEBUG __DLP_DEBUG_ARG__ :10003
166 ~~~
167