Newer versions of QML will support proper changing of break points, we
won't need to work around it anymore.
Task-number: QTCREATORBUG-20795
Change-Id: Idb5aaeb8ea59c7d2fd7c924e336ea259d3573d3d
Reviewed-by: hjk <hjk@qt.io>
As QML currently does not expose a command to atomically enable or
disable a breakpoint, we need to remove and re-insert it. The previous
code scheduled the removal through a timer, and depending on if the
timer hit before the insertion or after, the operation was successful or
not.
As the QML engine doesn't have to be in a specific state to insert and
remove breakpoints, we can just directly send the messages instead and
therefore be certain that they arrive in the right order.
Task-number: QTCREATORBUG-20795
Change-Id: If69797b2c75e1107ad552f88e709e1580b4164db
Reviewed-by: hjk <hjk@qt.io>
The debugger will treat any value you put in there as string, and then
fail to update the item because it doesn't expect the type to change.
Proper editing of JavaScript objects requires quite a bit more UI than
this, so disallow it for now.
Task-number: QTCREATORBUG-20736
Change-Id: I7bf6e7a3747cde3c6682b66aaa810291f753e85d
Reviewed-by: hjk <hjk@qt.io>
If an expanded object is updated we typically just get the ref for it.
If we leave the tree item at "wantsChildren", the debugger will think
that the update fails and "adjust" the "child expectation" to none.
Fetching the children right away takes care of this.
Task-number: QTCREATORBUG-20736
Change-Id: I1b3725e7106a563198962915cbcab8f68ef741a6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
All the functionality to guess local files from remote paths is already
there.
Change-Id: I5bffeb0f126efef99edbaf152e1a5e9e1d244699
Task-number: QTCREATORBUG-12008
Reviewed-by: hjk <hjk@qt.io>
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.
Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Qt 5.11.0 contains an optimization that does away with call contexts for
simple inline bindings. Also, it doesn't report QML contexts as scopes
in the "frame" and "backtrace" commands. Therefore, in those cases
"this" is the only thing to be retrieved.
Check if we are done when "this" has been retrieved and no scopes have
been found.
Change-Id: I9e0f545777bc38333938b65a934d42701ec4f807
Task-number: QTBUG-68218
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Mostly nullptr instead of 0, but also a few bits of collateral damage.
Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24
Reviewed-by: David Schulz <david.schulz@qt.io>
Make it return 'this' if 'this' is the master engine itself.
Adapt users.
Also do not let the QmlEngine try to beginConnection() when
the combined engine was isDying() already.
Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
... into a EngineShutdownFinished. They were never handled differently,
and the only option is to proceed to DebuggerFinished anyway. So
simplify the state machine a bit.
Change-Id: Ied3be86fff6750abca578dc6788e4be1d895692b
Reviewed-by: David Schulz <david.schulz@qt.io>
It was needed in the past to trigger e.g. gdbserver setup in
remote cases which is nowadays handled by separate RunWorkers.
Change-Id: I30bce071dab0779cce2e7abef7b31550d8539461
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
The quotes are stripped when the string is presented for editing, so
they have to be added back when we're done editing.
This is what we already did if we were talking to the inspector rather
than the V4 debugger.
In order for this to work, JS numbers need to be identified as numbers,
rather than strings. So, we have to add "number" to the types recognized
as float.
Change-Id: I2054f4ad36ec1d14fb2dfee3705a80c8ec84d5ac
Task-number: QTCREATORBUG-19032
Reviewed-by: hjk <hjk@qt.io>
Each engine has now the RunTool pointer, not just the master.
Change-Id: I6bab026998d5da5da82224bfaf4a93d3cfb3a898
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.
Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It might be null. We wrap the retrieval of the data stream version in
QmlDebugClient and return the minimum if connection is null. The extra
copy of the connection QmlEngine is dropped as QmlDebugClient already
has one and we don't want to hit a dangling pointer.
Change-Id: Ida8c45d357d46b4942eea99b77065d3c51c7edb9
Reviewed-by: hjk <hjk@qt.io>
Host and port reasonably belong together, using a QUrl makes that more
explicit and follows the lead of the Qml profiler in that area.
Change-Id: I754cb17d165ce6b2f25c655eeebfd8ac8f5a93c7
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Specify the qml server address and use correct default loop back
address in qmlengine
Change-Id: I9b77cb3385041bbe79900e7f7a188ca26124bacc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
... and replace it by direct uses of ProcessHandle::activate().
Change-Id: I7beffba7bfbeff72a81b8699ff54a311a74ce1a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and make use of it.
With gcc 7, the new option -Wimplicit-fallthrough is introduced and
added to the -Wextra set, triggering dozens of warnings in our sources.
Therefore, we annotate all obviously intended fall-throughs. The ones
that are still left are unclear and need to be checked by the respective
maintainer.
Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Not needed anymore in the world of RunWorkers.
Change-Id: Id7fb24fece6acb03de12f2677dd99a05c513e7a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
The parameters belong to the run control, they should not
be triplicated in case of a combined engine.
Change-Id: I4dd84220edbd7a44b902cc52627fe01d0568db75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add some customization hooks to make tools aware of target errors
and vice versa.
Change-Id: I4d815087297a3fa1d1d6d52daeed7c4ae0f624bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Less debugger specific code and less convoluted paths in debugger
message handling.
Change-Id: Ib298889c386d65f17acbdfc585188097bb20ed74
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The QML engine might (in the future) actually send the right message
to indicate a JavaScript null, that is:
{ type: "object", value: null }
This piece of JSON is then transformed into a QVariantMap. The QVariant
that signifies the null is unfortunately different across various Qt
versions. We can, however, detect it.
Change-Id: I3db42bb35a936bc02c749ab3a136b1d297aefdfe
Reviewed-by: hjk <hjk@qt.io>
The QmlDebugConnection can be quite spammy as it repeatedly tries to
connect to the application. Show error messages from this process in the
debugger log and only output a line in the status bar if the connection
is considered to have permanently failed.
Change-Id: I4a5715d9acdac47f690cb8aa67adb5cccff76e11
Task-number: QTCREATORBUG-17492
Reviewed-by: hjk <hjk@qt.io>
The v4 debug service doesn't understand "sanity" after all, but wants
to know the features we support. So state that we don't need redundant
references and that we understand names when sent as strings.
Change-Id: Ie973dd8002935a113a367d098337983d61663265
Reviewed-by: hjk <hjk@qt.io>
This signals that we understand packages without extra "handles",
that we can deal with only one level of nesting on replies to lookups
and expression evaluations, and that we can understand script and
function names transmitted as plain strings rather than refs.
Change-Id: Iffdd50179b8f9374e2fc8ad3a03cf44fbc627bf1
Task-number: QTBUG-42435
Reviewed-by: hjk <hjk@qt.io>
The QML engine will send the number of children in an object as the
"value" property together with the ref. We can use that to determine
if an object has children without actually fetching it.
Also, always save the type of a ref, even if we don't know the value
yet. This avoids redundant lookups.
Task-number: QTBUG-42435
Change-Id: Ia423b661187dc054fb5782349d1256711ee11265
Reviewed-by: hjk <hjk@qt.io>