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>
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>
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>
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>
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>
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>
Enable and disable breakpoints. Condition and ignoreCount
parameters can be reset for breakpoints.
Change-Id: I3427308964eff679828b25c473166524f45f0d56
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
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>
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>
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>
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>
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>
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>
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>