This was display only, with no impact on the console operation.
Change-Id: I1c6cab13a86b574d3912ea7fca2e0f14147b828c
Task-number: QTCREATORBUG-15831
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Displaying live contents uses nowadays a feature of Qt 5.7. The previous
display was not using the correct context. For Qt < 5.7, access is now
only possible when the context is clear (e.g. because a breakpoint
was hit). This patch adjusts the error message in the other case.
Task-number: QTCREATORBUG-15831
Change-Id: Ic25a3f6bca05523b16063f3e7daed6817c0002e7
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
This is a mechanical replacement for the former executable, processArgs,
inferiorEnvironment and workingDirectory members.
Change-Id: I4160e01427ed801df9b729f1f31d0a2ca48159b5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Newer versions of Qt can evaluate expressions without pausing the
QML engine. We can take advantage of that. At the same time we can
remove the crutch of using QQmlEngineDebugService for this. The
latter produces inconsistent and generally worse results than the V4
debug service.
Task-number: QTCREATORBUG-14931
Change-Id: Ic78d08a0b00cf7de3911b7b672ce229c6d779363
Reviewed-by: hjk <hjk@theqtcompany.com>
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).
This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.
For a plain std::vector<int> with 1 mio items this reduces
extraction time from more than 2 minutes to about 3 seconds.
Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Debugger and stub run locally, the debugged process not necessarily.
Change-Id: Ibf6aec3dcaec60069866ec0765ec2178ca0a26d6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Now it is closer to its only user and possibly reusable for no-QML uses
there. We also drop the QML/JS syntax checker. The application being
debugged can already tell us about syntax errors. There is no need to
duplicate that functionality.
Change-Id: I2ba151f9f4c854c6119ba5462c21be40bddcebf9
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
The debugger log is not very accessible and people may want to see this
message.
Change-Id: Id5e5a6d84f3576df3756d1fabc9f5801dcebac6e
Reviewed-by: hjk <hjk@theqtcompany.com>
The message window can do that by itself and in other places we may
want to print the whole message in one line.
Change-Id: I5f0891c7b81717182d17b83f5a62ab06ad168801
Reviewed-by: hjk <hjk@theqtcompany.com>
Just like with the QML-only engine we might not get the output for a
variety of reasons. As we've specified the port on the command line,
it's likely that the application will start listening at some point,
though.
Change-Id: Ifda69ba15c659cf95e708d35bed34cfb9b3c40ec
Task-number: QTCREATORBUG-15409
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
There is no point in sending two signals for every state change and
error. Also, the signals only reflect events in the socket, not in the
logical connection.
Change-Id: I617a925c69164aa1a02a7781b9da7dca55daa304
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This is to adopt the naming to the code in src/qmldebug in
qtdeclarative. Once we can require a version of Qt that has qmldebug
for building QtCreator we can then remove our own version of this code.
Change-Id: I573f0703871b5812789c5c7a6287567d5c2875e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
There is no point in having both as they serve the same purpose. Also,
most of the packet protocol API was never used or tested, and wrapping
each byte to be sent into a QPacket is wasteful and unnecessary.
Change-Id: Ia421eae33b644fe86a53bcd04092a84ea3000f0d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
from actual reponse handling
New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.
Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The V4 debug service expects correct JSON as input and gdb, lldb, and
pdb expect Python object literals. There is a subset of JSON that is
also valid as Python object literals and we use that for the protocol
spoken with gdb, lldb, and pdb. The strings passed to CDB are tunneled
through JSON strings and converted to byte arrays before sending them.
Change-Id: I87319b5450e5c3c3b29c565b75cddaa612767611
Task-number: QTCREATORBUG-14931
Reviewed-by: hjk <hjk@theqtcompany.com>
Since resetLocation() is called when the repective actions are
triggered immediately before the engine's executeFoo() are called
there is no need to call them in executeFoo() again.
Also, remove the unused autoContinueInferior(); function.
Change-Id: I8d2ec419c0da6efa388ce1ed317f31d24654897f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
There's a 1:1 relation, and the abstraction is not needed anymore.
Also remove some unused code.
Change-Id: I09a2522deb5d522f46ec7518d19978a038032fbb
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Using Utils:TreeView automatically gives us the capability for loading
item as they are expanded. This way we can show recursive structure in
the console as well as load data from the debug server on demand.
Also, properly print error messages received from unsuccessful
command evaluations.
Task-number: QTCREATORBUG-14931
Change-Id: I66d440eedd9723b04670169b27db1ee18f3f2891
Reviewed-by: hjk <hjk@theqtcompany.com>
null is an object in JavaScript. This is slightly insane, but hiding
it in the debugger view doesn't help.
Change-Id: I69fe317f28a515785720104f92306f69a2e56266
Reviewed-by: hjk <hjk@theqtcompany.com>
Previously, only the first level of properties was expanded,
properties of object type could not be expanded further.
This can be reproduced by opening the SameGame example,
putting and triggering a breakpoint at startNewGame(),
expanding the 'this' entry in the Locals view and checking
the 'component' subentry.
Change-Id: I6cf714af697ab4eebd7eb0ae0ea37e516b3ea635
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
In the QmlEngine, a few tr() have been replaced by
QCoreApplication::translate().
In other files, Q_OBJECT has been added to the class definitions.
Change-Id: Ia0505c19934dc691cd3d67f4946293290c2fec68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
The server on the Qt side Q_ASSERTs otherwise, killing the application.
Change-Id: I273f12c4bc89bd3488fa6409fdbebc6a6ac2b606
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
There are two cases that do not coincide in asynchronous
engines such as the QmlEngine: Inserting a new watch item,
and expanding the children of an existing item.
Change-Id: Ic98a5f1e89aca37146039a241de737c407606e83
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Use callbacks in QmlEnginePrivate::evaluate(). This separates the
four code paths through the machinery into three separate handlers
and one direct access to the console.
This also fixes a bug where items were put into 'debuggerCommands'
but attempted to be removed from 'updateLocalsAndWatchers'.
Introduce a QmlEngine::updateLocals similar to what the other
engines do. Let the frame() and assignValue() paths use it.
Keep track of pending changes and call notifyUpdateFinished
if and only if the pending lookup queues is empty.
Finally, remove some dead code.
Change-Id: I173a52911d0de994b849fc6ab4f52ef7f64a8ba5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Version, Backtrace, Frame, Scope and Lookup for now.
Change-Id: I615c8f8c00484e9bb1742485f24bdfc537f83021
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
No need to re-do it each time the reference is used.
Change-Id: Ie90101df8f2b0f5e31c6a18af7cac165d060c5fe
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Needed in preparation to determine the time of a needed
watchHandler()->notifyUpdateFinished() deterministically
which in turn is needed to get the update cycle of
evaluated expressions right.
This will also save roundtrips later.
Change-Id: Id90101df8f2b0f5e31c6a18af7cac165d060c5fe
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... instead of manually set up JSON. It's more concise, and paves the
way to use per-command callbacks as in the other engines.
Change-Id: Ib5cf9c9b882ec0ec87acd7c1ceb938d3ee60346b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
One more step to make it more similar to the other engines.
Change-Id: I0f028bf55b980c8acee9d80875ed5e9b4b565980
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Create a QmlEnginePrivate. Move the QmlDebugClient there.
Merge QmlAdapter into QmlEngine Abstraction is not used anymore.
Move some helper bits to a qmlengineutils.{h,cpp}
Change-Id: I63117355d786cc12641101b7fd38c7cd208d11eb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Abstraction is not used after the demise of QScriptDebuggerClient
and unlikely to be used again.
Change-Id: Icdd6615eb0d1468fd9a3d717d6a7d5e44f7f7d79
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.
Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.
Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Right now, DebuggerStartParameter is part of the debugger plugin
external interface. Better not make it fatter than necessary.
Change-Id: I3b9205089f971dd314ccba1335b5ca2d4d9fe7c6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... in WatchHandler and DebuggerEngine interface.
Adjust using code.
Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
The only information ever used is whether it's c++ or not.
Change-Id: I4ca00663856dd66cbdf58c468f175a8c9e41d6a5
Reviewed-by: hjk <hjk@theqtcompany.com>