The console is now a part of qmljstools plugin. The console
appears as an output pane. A dummy QScriptEngine evaluates
expressions when a declarative debug session is not in
progress. During a debug session, the expressions are
evaluated by the debug services.
Task-Number: QTCREATORBUG-7402
Change-Id: Ic2eeac44fb335c706be03b89f8672b0356efe984
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
Version specific snippets were introduced to
avoid incompatibilities during Qt5 development.
Change-Id: I60fa9beafc9d55b687c08e13cdf531baecb10fbb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.
Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Fix gdmi escape routine by using a traits class to adapt
QByteArray/QString.
Change-Id: Ic6d2a0c927e4613aec9f69095bbb04a393e9edb9
Reviewed-by: hjk <qthjk@ovi.com>
- Compile with QT_NO_CAST_FROM_ASCII.
- Remove single character string constants.
Change-Id: Icece98619b6c30e047d3fce00e6ae74bbcd53c67
Reviewed-by: hjk <qthjk@ovi.com>
Remove and add breakpoint when a breakpoint is edited.
Change-Id: Idb231c0e9d44fe295007b299660fcbe3a980a252
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
It's one model for all locals, watch, return, tooltip and inspector
data. This allows more streamlined code paths and better isolation
of the model data from the WatchHandler. WatchItems are now registered
in a hash indexed by iname, so inames can be used as the primary
handle to watch data in the WatchHandler interface.
Change-Id: Idac0a808b5d785307496d1de4198a1f2e9ce3880
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Rename the QmlJSDebugClient lib to QmlDebug (shorter names, easier differentiation with the shared/qmljsdebug lib).
Also rename
- QDeclarativeDebug* classes to QmlDebug*
- QDeclarativeOutputParser class to QmlOutputParser
To clarify the features,
- Debugger::QmlDebuggerClient is now Debugger::BaseQmlDebuggerClient
- QmlEngineDebugClient is now BaseEngineDebugClient
- QmlDebuggerClient is now QmlEngineDebugClient
- QDeclarativeEngineDebugClient is now DeclarativeEngineDebugClient
Change-Id: Ie15713730a614c8ab4b637fad0924f95b54e633f
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Refactor QML Signal Handler to QML Signal Emit. This is because the
debugger breaks when a matching signal is emitted irrespective of
whether there is a handler connected to the signal.
Change-Id: I852ace75c1962290717ed127ac5938d7505b9a7e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
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>
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>
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>
Make breakpoint non-pending when the breakpoint is accepted
by the v8 debugger.
Change-Id: Id67ce764ef6be9279d3fcc0f34734e5ac9541425
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
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>
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>
Fix Run to Line functionality. Regresseion was introduced by
fd82e54a5b
Change-Id: Ie2d3eb3d0df7ba73950c4d3c70ab25b9e7f7ab36
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
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>
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>
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>
Show QML/Javascript objects as a tree when
evaluated in the console.
Change-Id: I42901bf9bda3f18fb9fb1ca309a8370ccbe37c0a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
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>
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>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Update Locals when evaluating expression and also when
activating a specific stack frame.
Change-Id: I40ef12e980e67add98c7cad1ec4cd615bf4763ec
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Remove BreakpointByFunction capability as it is not supported
by the v8debugservice.
Change-Id: I60e3d0d6f5669f83fa621cd99f25512cad3dbb96
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Set the function name in the break parameters when the breakpoint
is hit.
Change-Id: I40d13f273808f7ea44a7fd8c41284ee7f476d286
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
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>
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>
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>
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>
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>
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>