189If you use qmake, you can add the \c {CONFIG+=qml_debug}
190configuration parameters to the project \c{.pro} file or pass it as argument on the command line.
191
192If you use another build system, you need to pass the \c {QT_QML_DEBUG} define
193to the compiler via the build system's means.
194
195\note Enabling the debugging infrastructure may compromise the integrity of
196your application and system, and therefore, you should only enable it in a
197controlled environment. When the infrastructure is enabled, the application
198displays the following warning: \br \c {QML debugging is enabled. Only use this in a safe environment.}
199
200\section2 Starting applications
201
202To enable debugging -- from the start or to attach a debugger later on -- start
203the application with the following arguments:
204
205\c {-qmljsdebugger=port:<port_from>[,port_to][,host:<ip address>][,block][,file:<local socket>][,services:<comma-separated list of services to enable>]}
206
207Where:
208\list
209 \li the mandatory \c {port_from} specifies either the debugging port or the
210 start port of a range of ports when \c {port_to} is specified
211 \li the optional \c {ip address} specifies the IP address of the host where
212 the application is running
213 \li the optional \c block prevents the application from running until the
214 debug client connects to the server
215 \li the optional \c {file} specifies the local socket.
216 \li the optional \c {services} specifies the services to enable; the default
217 is all that are found. Note that the \c{v4 debug} service disables the
218 JIT.
219\endlist
220
221After the application has successfully started, it displays the following
222message:
223
224\c {QML Debugger: Waiting for connection on port <port_number>}
225
226or
227
228\c {QML Debugger: Connecting to socket at <file>}
229
230\section2 Connecting to applications
231
232When the application is running, an IDE or a tool that implements the binary
233protocol can connect to the open port.
234\section1 Debugging with \QC
235
236\QC uses the debugging infrastructure to debug, inspect, and profile QML
237applications on the desktop as well as on remote devices. \QC provides
238integrated clients for debugging JavaScript, inspecting the object tree, and
239profiling the activities of a QML engine. For more information, see