There is no point in trying to "gracefully" shutdown by waiting for the
application to hit the next line of JavaScript. The application might
never execute any more JavaScript.
Change-Id: Id531a2b23ce9aa12462e308f29106f8cefa67092
Task-number: QTCREATORBUG-16709
Reviewed-by: hjk <hjk@qt.io>
There is no reason to clear all the other views, too. The inspector
view stays valid across interruptions and the C++ views have nothing
to do with this at all.
Change-Id: I7a0bfe160a6b3c0134d592abef9c10f95fcfcd3f
Task-number: QTCREATORBUG-16692
Reviewed-by: hjk <hjk@qt.io>
After sending the interrupt request the application will continue to
the next line of JavaScript and only interrupt then. There is no way
to interrupt the application via the JS debugger as long as no JS
engine is active.
The downside of this is that the pause/continue/stop icons are disabled
until the application actually interrupts. The user might not
understand this.
Change-Id: I355de52f65898d6bdcd437675adba368662f3c13
Task-number: QTCREATORBUG-16646
Reviewed-by: hjk <hjk@qt.io>
A socket error is not the only possible reason for a connection failure
and exposing socket error codes to the upper layers is unnecessary.
Change-Id: I27e9f21160ecea5b0d811b83b7ab0ab9071cacff
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The main idea is to start using ProjectExplorer::Connection later.
Change-Id: Ie91eacdfb0e93ae142fec7ce32bcf554a5282122
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
For better typesafety on the user side (and optional) for items with uniformly
typed children. Use it for UniformTreeModels, and consequently WatchModel
to get rid of some of the static_casts there.
Change-Id: Ic20e507036e180c24997b236230f0f71b285202c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.
Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
You can now interact with QML objects selected with the "select" tool
again, when unpausedEvaluate is off.
Change-Id: If6b4a55193a8949b2e3048fe78443c5df6710885
Task-number: QTCREATORBUG-16300
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This solves the ambiguity between 0 and -1 being the "invalid" port.
Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
Multiple copies of lookup requests may accumulate when stepping
too quickly, outsmarting the 'all updates done' logic, keeping
Locals&Expressions in the grey 'update ongoing' state.
Change-Id: Icec24ce1af8d273c3439ee91800ed1f4381ee19a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
(cherry picked from commit c1de315d6c)
This avoids accumulating lookup requests when stepping quickly.
They won't produce usable output anymore.
Change-Id: I9e29ca1778019e3eab37d122386d3faf0e07edbf
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
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>
The sender()/qobject_cast construct is ugly, unnecessary and it doesn't
work if the method is called directly, rather than through a signal.
Change-Id: I0ac09ad04b956fb4cac38a89162a9dc0055d1831
Reviewed-by: hjk <hjk@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>