Commit Graph

113 Commits

Author SHA1 Message Date
Aurindam Jana
b9dfbd8ec3 QtMessageLogHandler: Sorting child items
Insert child items in sorted order if the "Sort Members and
Classes Alphabetically" is set in Locals And Expressions.

Change-Id: Ib21803326ec3f35c9541c08d876c4a38c0202a9f
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-22 12:04:48 +01:00
Aurindam Jana
10478246a9 QtMessageLogHandler: Insert child items in alphabetical order
Change-Id: I644207f5e8b149364e73abf7512240e918260072
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-22 11:03:18 +01:00
Aurindam Jana
3d1f5bd85c QtMessageLogHandler: Fix crash
Set a parent when creating QtMessageLogItem.

Change-Id: I8faf76059dcc517794a4eb3d202bc14cd1632ca8
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-22 10:53:10 +01:00
Aurindam Jana
380a32d4fa QmlDebugging: Fix 'this' in Locals And Watchers
Incase of global object, query the children only when
needed as the response takes a lot of time. Remove cached
requests when switching stack frames so that stale responses
are not parsed.

Change-Id: I70887773952ecaa61da21077ffec321fd5fabbb1
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-21 16:29:47 +01:00
Aurindam Jana
44de30e769 QmlDebugging: Fix Watched Expressions
The data response was incorrectly parsed for watched expressions.
This patch fixes the parsing. It also fixes removal and readdition
of a watched expression.

Change-Id: I1a9e2db3d4963d7fe12ed468ae5466a106011487
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-21 15:03:14 +01:00
Aurindam Jana
41a66d7478 QmlV8DebuggerClient: Make breakpoint non-pending
Make breakpoint non-pending when the breakpoint is accepted
by the v8 debugger.

Change-Id: Id67ce764ef6be9279d3fcc0f34734e5ac9541425
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-14 14:47:36 +01:00
Aurindam Jana
6e0caec046 QmlDebugging: Assign Value in Debugger
Call EXEC instead of SET_PROPERTY for assigning a value
in Locals and Expressions. Also check if the id of the
object is valid before calling EXPAND.

Task-number: QTCREATORBUG-7089
Change-Id: I2769e5345cfb7ecf87e36125821f141821556690
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
2012-03-14 13:55:15 +01:00
Aurindam Jana
2cf515d8f2 QmlV8DebuggerClient: Change breakpoint line number
V8 Debugger does not support changing line numbers of active
brekpoints. Remove the existing breakpoint and add a new one.

Change-Id: I0e6302d6d911887890d674960cc241f89c4cdc96
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-12 14:00:37 +01:00
Aurindam Jana
45b806564d QmlDebugging: Fix Regression
Fix Run to Line functionality. Regresseion was introduced by
fd82e54a5b

Change-Id: Ie2d3eb3d0df7ba73950c4d3c70ab25b9e7f7ab36
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-01 12:07:53 +01:00
Aurindam Jana
fd82e54a5b QmlV8DebuggerClient: Relocate breakpoints
Walk the AST to find probable "breakable" code positions
and relocate breakpoints.

Change-Id: I3033bb85b21436face8265661aa8779c63dcf960
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-02-29 18:51:30 +01:00
Aurindam Jana
6488b69ef3 QmlV8DebuggerClient: Remove code for older service version
The base service version of QV8DebugService is now 2.0
Support for older versions is not required anymore.

Change-Id: I5eb58ea64b1a621c853bdf236abf5412a704cbac
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-28 15:44:57 +01:00
Aurindam Jana
0a2140f5e8 QmlCppDebugger: Handling Stack
Use a common stackhandler in the mixed engine
instead of individual stackhandlers in qml engine
and cpp engine.

Change-Id: If363fabb32ae7c6e652452ca2b2fbf8593e684a5
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-28 15:44:48 +01:00
Aurindam Jana
9720c0d737 QmlDebugging: Show Object Tree in Console
Show QML/Javascript objects as a tree when
evaluated in the console.

Change-Id: I42901bf9bda3f18fb9fb1ca309a8370ccbe37c0a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-21 12:51:42 +01:00
Aurindam Jana
147396d764 ScriptConsole: Refactor to QtMessageLogWindow
Move QML/JS independent classes to common Debugger
code. A Debugger Engine needs to override
evaluateScriptExpression() to provide engine
specific script evaluation.

Change-Id: I02b23b380a3eb1b12003b30ded0b7d075e44dfed
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-20 17:51:05 +01:00
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.

Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-20 13:32:49 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
Aurindam Jana
2d88b3d905 QmlDebugging: Evaluating expression
Update Locals when evaluating expression and also when
activating a specific stack frame.

Change-Id: I40ef12e980e67add98c7cad1ec4cd615bf4763ec
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-11 16:02:17 +01:00
Aurindam Jana
ed2f41bb58 QmlDebugging: Remove BreakpointByFunction
Remove BreakpointByFunction capability as it is not supported
by the v8debugservice.

Change-Id: I60e3d0d6f5669f83fa621cd99f25512cad3dbb96
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-09 16:18:35 +01:00
Aurindam Jana
641716bee3 QmlDebugging: Implement RunToLine capability
Change-Id: I153c30310ac318d2de8b9a96c6d1e7f80439d306
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-09 10:53:19 +01:00
Aurindam Jana
bcd9bbb6f5 QmlDebugging: Breakpoint data
Set the function name in the break parameters when the breakpoint
is hit.

Change-Id: I40d13f273808f7ea44a7fd8c41284ee7f476d286
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-09 10:41:43 +01:00
Aurindam Jana
83196c2611 QmlDebugging: Handle interrupt
Handle the case where debug break is due to interrupt
and not due to hitting a breakpoint.

Change-Id: I080ef779558432f9285fb94aaed548ecf476fb91
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-07 22:05:05 +01:00
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