diff options
author | Venugopal Shivashankar <venugopal.shivashankar@digia.com> | 2015-04-30 12:16:16 +0200 |
---|---|---|
committer | Venugopal Shivashankar <venugopal.shivashankar@digia.com> | 2015-05-13 10:58:37 +0000 |
commit | 0c932e61428f8076c46dd10d4ccc486970b04451 (patch) | |
tree | d16236ab16acd876f8ff61748d666e22029d679b | |
parent | b6142532efe5986afd3cdc7788082a95f2d10f8f (diff) |
Doc: Added \keyword entries for console.xxx
These \keyword entries should list the corresponding
topics for console.xxx in the help index.
Task-number: QTBUG-45090
Change-Id: I734672ec2dae86f6d253ae66acba01a5c06bce93
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
-rw-r--r-- | doc/src/qmlapp/debugging.qdoc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/src/qmlapp/debugging.qdoc b/doc/src/qmlapp/debugging.qdoc index 3972c36d1..b9ab0e220 100644 --- a/doc/src/qmlapp/debugging.qdoc +++ b/doc/src/qmlapp/debugging.qdoc @@ -34,6 +34,7 @@ \section1 Console API \section2 Log +\keyword console log \c console.log, console.debug, console.info, console.warn and console.error can be used to print debugging information to the console. For example: @@ -48,6 +49,7 @@ The output is generated using the qDebug, qWarning, qCritical methods in C++ (see also \l {Debugging Techniques}). \section2 Assert +\keyword console assert \c console.assert tests that an expression is true. If not, it will write an optional message to the console and print the stack trace. @@ -61,7 +63,8 @@ function f() { \endcode \section2 Timer - +\keyword console time +\keyword console timeEnd \c console.time and console.timeEnd log the time (in milliseconds) that was spent between the calls. Both take a string argument that identifies the measurement. For example: @@ -77,13 +80,14 @@ function f() { \endcode \section2 Trace +\keyword console trace \c console.trace prints the stack trace of the JavaScript execution at the point where it was called. The stack trace info contains the function name, file name, line number and column number. The stack trace is limited to last 10 stack frames. \section2 Count - +\keyword console count \c console.count prints the current number of times a particular piece of code has been executed, along with a message. That is, @@ -96,10 +100,11 @@ function f() { will print \c{f called: 1}, \c{f called: 2} ... whenever \c{f()} is executed. \section2 Profile - +\keyword console profile \c console.profile turns on the QML and JavaScript profilers. Nested calls are not supported and a warning will be printed to the console. +\keyword console profileEnd \c console.profileEnd turns off the QML and JavaScript profilers. Calling this function without a previous call to console.profile will print a warning to the console. A profiling client should have been attached before this call to receive and store the @@ -116,7 +121,7 @@ function f() { \endcode \section2 Exception - +\keyword console exception \c console.exception prints an error message together with the stack trace of JavaScript execution at the point where it is called. @@ -145,7 +150,8 @@ QQmlImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle" \endcode \section1 QML Debugging Infrastructure - +\keyword declarative_debug +\keyword qml debug The \l{Qt QML} module provides services for debugging, inspecting, and profiling applications via a TCP port. |