Commit Graph

91 Commits

Author SHA1 Message Date
Friedemann Kleint
ec49390052 QML-Debugger: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: Id6f437c54504f6730c8726264f460b8f1631899d
Reviewed-by: hjk <qthjk@ovi.com>
2011-12-21 13:48:21 +01:00
Kai Koehne
bfbdec8427 Avoid hitting the anonymous wrapper functions in .qml file
QtDeclarative generates anonymous wrapper functions for QML bindings
and slots, e.g.

    onPressed(): { i++ }

becomes

(function (onPressed) { i++ } )

v8 will by default break when the anonymous function is called, not
when the actual code is executed. If we now hit this outer function
we'll relocate the breakpoint to column = 1, and continue.

Change-Id: Ieea4f4ea4fbf21d7245a6243fc36d141948ef2ce
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-21 11:22:17 +01:00
Kai Koehne
cd63f3865f Debugger: Populate "Source Files" for QML, showing shadow .js structure
Request the sources actually seen by v8, and show them in a separate file
(click on the leftmost column). Automatically populating 'Source Files'
and also making the functionality available for mixed debugging requires
some more thought ...

Change-Id: Id8f55eed9c842b545434a6c608fb34d370a8f8bb
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-20 15:57:57 +01:00
Yuchen Deng
2cb7c6adcf QML Debugger: Fix warning
Change-Id: If6678115cb2730d61ee9d0e64a81aeffad183f82
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-20 08:46:59 +01:00
Aurindam Jana
567dd0a5c5 QmlV8DebuggerClient: Watched Expressions
Expand watched expressions.

Change-Id: Ic4e5860931f3a7c6a33f37697585f43d7c2664a0
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-19 19:34:33 +01:00
Aurindam Jana
b4ca00bb69 Fix build break
Change-Id: I78825294251b364b471b37479f3ae57893e4f903
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-12-16 13:25:27 +01:00
Aurindam Jana
0c6f060e7e QmlV8DebuggerClient: Log the V8 Version
Change-Id: Ie51db80902a3dbc1fcfe352eb770965555551dba
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-16 13:12:29 +01:00
Aurindam Jana
828f8a2cbd QmlV8DebuggerClient: Evaluate expressions
Check if the current stack frame is usable before
sending eval request to v8.

Change-Id: Ief687516b1b4a323c2b602f1b54d83ff7661bed4
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-16 13:12:20 +01:00
Aurindam Jana
a4b63e5796 QmlV8DebuggerClient: Changes related to v8DebugService protocol
V8DebugService uses a different protocol. This fix now uses the
new protocol. It also optimizes the number of debug requests made
to retrieve debug information.

Change-Id: I40d7b1d4ab0535831c6a19cadd9b48763934c1de
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-16 13:12:07 +01:00
Kai Koehne
80d3ebedca QmlDebugger: Make sure v8 messages show up in the debugger log
Change-Id: Icd65cde2bcb09eaa35cf67399e60e9d9f4484105
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-07 11:26:41 +01:00
Yuchen Deng
fd4e21b685 Debugger: Fix warning
warning: C4819: The file contains a character that cannot be represented
in the current code page (936).
Save the file in Unicode format to prevent data loss.

Change-Id: I33ff1b1295df234da9cf42efc5d3745c316f6528
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-07 10:32:01 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Aurindam Jana
727dd1b167 QmlV8DebuggerClient: Evaluate Expression
V8 engine may return an anonymous event for Evaluation of an expression
instead of a response, if the expression has syntax error. This fix
handles this particular case.

Change-Id: Ic89252b04eb4d6f7e6b0b2e03067f031f1f446ed
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-08 14:47:05 +01:00
Aurindam Jana
5cc536cd5a QmlV8DebuggerClient: Watched Expressions
Show errors in evaluating watched expressions in the watch window
and not in the console.

Change-Id: I4792d54268bcdef085aa4dab091c5f27a4a01c02
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-07 12:33:38 +01:00
Aurindam Jana
ab3d07a23d QmlV8DebuggerClient: Optimize debug requests
Do not send duplicate and redundant requests.
Use a queue to ensure processing of one request at a time
during a debug break

Change-Id: I086ef3b578922fb247f9d35f9759855227e63eaa
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-07 10:44:58 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Aurindam Jana
717acb6bf4 QmlV8DebuggerClient: Local Variables
Show "this" data in the locals window.
If handle is not present in ref list then fetch Local data
asynchronously. Insert the data when lookup request succeeds.

Change-Id: Ie342bcb963b76b8fcdb958979b59fb084fe50e51
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-01 13:34:14 +01:00
Aurindam Jana
ff73727f2f QmlV8DebuggerClient: Show Watched Expressions
Change-Id: Ic51116741556ba1f36f64c7d1341ba993bdeacc9
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-01 10:52:38 +01:00
Aurindam Jana
b8af7f2ad8 QmlV8DebuggerClient: Locals Window
Show locals that are visible in current scope.

Change-Id: I3f661052485b0ed14b1f1a674d3421188cd495f9
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-01 10:52:27 +01:00
Aurindam Jana
366a9d0d0e QmlV8DebuggerClient: Set Correct Initial state
Change-Id: I86bc33a224dd765ec5c27871f7ae7f3208ed615b
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-31 11:49:10 +01:00
Aurindam Jana
d0c1f55aa8 QmlV8DebuggerClient: Show Exception Underline under correct line.
Change-Id: I30a38150930657109dba2a037de34a33ca4ebf1c
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-28 16:58:46 +02:00
Aurindam Jana
3ad539f8a0 QmlV8DebuggerClient: Fix Crash.
Call resetState() in ctor.

Change-Id: Ib95477adcb198fb2f9de26f1ad6cd64f0508fcdd
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 13:23:31 +02:00
Aurindam Jana
a5543b8920 QmlV8DebuggerClient: Show exception info in console.
Exception Information is printed in QML Script Console if
breakpoint of type "Break when JavaScript exception is thrown"
is enabled.

Change-Id: I9bc5839ba7b7019682e03cc5d71ae6e44e23f63a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 12:07:17 +02:00
Aurindam Jana
0112be9630 QmlV8DebuggerClient: Edit variables in Locals Window.
Change-Id: Id0c368b1f39fdffdcb0f46a4d74c364e021bb332
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 12:07:09 +02:00
Aurindam Jana
e8d8666034 QmlV8DebuggerClient: Edit breakpoints
Enable and disable breakpoints. Condition and ignoreCount
parameters can be reset for breakpoints.

Change-Id: I3427308964eff679828b25c473166524f45f0d56
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 12:07:02 +02:00
Aurindam Jana
8cff1db82b QmlV8DebuggerClient: Introduce Debugger client states
Change List:
Introduced states to prevent possible race condition on the
service side which uses an event loop. Evaluations in QML
Script Console is reflected in the Locals Window.

Change-Id: I1b7644b856168fd59e1cf1d1498c7107d42f2af5
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 12:06:53 +02:00
Aurindam Jana
f3c047a33c QmlV8DebuggerClient: Refactored code
Change List:
a) Refactored code: Shifted JSON message creation to
QmlV8DebuggerClientPrivate.
b) QScriptEngine is used for JSON instead of JsonValue and
JsonInputStream.
c) Locals Window displays all variables accessible in the current
context.

Change-Id: I82e73f6c57482408f5fc501c908aa96297d3d754
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 12:06:42 +02:00
Aurindam Jana
32ef6c563d V8DebuggerClient: Enable breakpoints on Exceptions
Previously break on exceptions was always enabled. Now, the user
can add a breakpoint on Javascript Exceptions from the breakpoint
window in the debugger.

Change-Id: Ia9ee813d2fccf89b607fe1dcbad47b4084155a48
Reviewed-on: http://codereview.qt-project.org/6348
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-11 11:25:34 +02:00
Aurindam Jana
3c61cbb5df Debugger: Change BreakpointOnSignalHandler to BreakpointOnQMLSignalHandler
Change-Id: Ic71299c38863cdb55862ced7348b2bdc9cf39555
Reviewed-on: http://codereview.qt-project.org/5743
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-09-30 16:19:17 +02:00
Aurindam Jana
f05683ac7e JSDebugger: Enable break on events.
The user can request Javascript break on event. The user can provide
this info in the Breakpoints Window and provide the slot which will
be called when the event occurs. For example: specify "onTriggered" if
you need to break on Timer triggered event.

Change-Id: If936d7402f5978a182132fdcca75515588364e16
Reviewed-on: http://codereview.qt-project.org/4758
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-09-16 11:42:54 +02:00
Aurindam Jana
06723f8df9 JSDebugger: Break on Exception
The debugger breaks on Javascript exception. The error message is
printed on the ScriptConsole and the relevant code is marked with
a wavy underline.

Change-Id: I5e6f603430c3b8a0db450d1e8c821714ec0140ab
Reviewed-on: http://codereview.qt-project.org/4276
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-09-14 11:21:42 +02:00
Aurindam Jana
29c0f0bfef Debugger: Client Service synchronization
Sends connect command after all initial commands have been sent.
This ensures that the initialization is complete before the start
of the debugging session.

Change-Id: I1903caa9c213fef4e6b40df89a352d80e350a46d
Reviewed-on: http://codereview.qt.nokia.com/3526
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-08-25 11:48:50 +02:00
Aurindam Jana
21e50d82df Debugger: Set breakpoints on actual locations in code
This fix sets moves breakpoints on commented lines to the next executable line.

Change-Id: Ie9ca8a7c6e0360ce4a916053ef7aedd1cc28484d
Reviewed-on: http://codereview.qt.nokia.com/3525
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-08-25 11:48:22 +02:00
Aurindam Jana
3edc756ad7 Improved breakpoint handling in qmlv8debuggerclient
Breakpoints are resolved and set only after querying for their actual locations from v8 engine.

Change-Id: If119865f50d9f91a4930096751599a4f22bc9d26
Reviewed-on: http://codereview.qt.nokia.com/3406
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-08-23 15:40:10 +02:00
Aurindam Jana
a75c905687 Debugger: Suppress v8 specific locals
This Hack ensures that v8 specific locals are not visible in the debugger locals and watchers window

Change-Id: I3958a4dc0c9ded3de2686546ad1d51f080952b6a
Reviewed-on: http://codereview.qt.nokia.com/3408
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-08-23 15:36:52 +02:00
Aurindam Jana
6b8b2e63ea Refactoring v8debuggerclient and scriptdebuggerclient
Change-Id: Ifa2e9a9901a166907bd7c3999421146b07bd1c59
Reviewed-on: http://codereview.qt.nokia.com/3328
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-08-23 15:35:26 +02:00
Aurindam Jana
2b84f9f369 Synchronize the client with the debug service
The v8 engine is blocked till the client is connected to the service to ensure proper hitting of breakpoints.

Task-number: QTCREATORBUG-5412

Change-Id: Iec772cb547a31fef4cccbd4bb1116699c52d20e5
Reviewed-on: http://codereview.qt.nokia.com/3308
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-08-23 15:35:03 +02:00
Aurindam Jana
879766d85c Notify disconnect to debug server when inferiorshutdownrequested
Change-Id: I15bb1342f647362cb00e4b0d0453b663a2d3f637
Reviewed-on: http://codereview.qt.nokia.com/3095
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-08-17 14:48:14 +02:00
Aurindam Jana
1b2f1f102e Changed the behaviour of setting breakpoints in qml files.
Delegates setting of breakpoints to functions that set/reset/change the breakpoint one at a time.
Change-Id: I553a74b05cf19c9d2436344db67bc962da18457f
Reviewed-on: http://codereview.qt.nokia.com/3082
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-08-17 12:59:43 +02:00
Aurindam Jana
50d3bd31f8 Remove warning for unused paramters in qmlv8debuggerclient.
Change-Id: I4e82880f9026e5b9c321a21e9995724b0744550b
Reviewed-on: http://codereview.qt.nokia.com/2629
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-08-04 15:52:52 +02:00
Aurindam Jana
ab574ba88d Delegate javascript debugging to Script and V8 debugger clients.
The appropriate client handles the debugging based on the service available at the server side.

Change-Id: I46b66036f700fc7e45e8b38cef7f1ce1445b1122
Reviewed-on: http://codereview.qt.nokia.com/2497
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-08-03 11:27:38 +02:00