Commit Graph

422 Commits

Author SHA1 Message Date
Kai Koehne
ccc55a6149 Debugger: Properly exit when engine run failed
Instantly stop the engine if e.g. the port is blocked. If we let
it running until the user closes the dialog, the timeout for automatic
connects would be triggered, and we'd get yet another dialog afterwards
telling the user that the connection failed.

Change-Id: Ifd0e9d743f3b8f4ba853be032d9527559ef6004e
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-03-15 10:21:32 +01:00
Aurindam Jana
6e0caec046 QmlDebugging: Assign Value in Debugger
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>
2012-03-14 13:55:15 +01:00
Aurindam Jana
f7caba3923 QMLDebugging: Fix crash
Check for null pointers when parsing AST to relocate breakpoint

Change-Id: I484048d9e8a7aabdeffc4e18049c9b9b6f030366
Reviewed-by: Simjees Abraham <simjees.abraham@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-09 09:59:58 +01:00
Kai Koehne
30c21397a6 QmlDebugger: Close connection already in shutdownInferior
Doing it in shutdownEngine was too late for the mixed debugger
case: The client has already exited in this case, leading to
error messages on the (system) console.

Change-Id: Id31214cb7a1bc9530c1da78b872531bc79894f3b
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-03-08 10:11:17 +01:00
Robert Loehning
b41171c847 Normalized connect()s
Change-Id: Id353ab140a46e06ffc3abf667ab3b234e749e17c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-03-06 12:46:52 +01:00
Aurindam Jana
41cbb6cdee QmlDebugging: Fix breakpoint states
For mixed debugging, the ownership of breakpoints is with
the mixed engine so that it can set the state of the breakpoints
correctly on DebuggerFinished.

Change-Id: I0e03493ac997dbca0a34ca65de1eba3690faceba
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-03-02 12:25:51 +01:00
Aurindam Jana
fd82e54a5b QmlV8DebuggerClient: Relocate breakpoints
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>
2012-02-29 18:51:30 +01:00
Aurindam Jana
6668ee1317 QmlCppDebugger: Shutdown engine on port busy
Shutdown the debugger engines when the qmljsdebugger port
is busy.

Change-Id: If7f470b04bae26f3bac11863f697b260b463ca4e
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-28 15:44:38 +01:00
Aurindam Jana
a167498ea1 ScriptConsole: Show File and Line Info
Show File and Line Info for items that have the info. Clicking
on the item opens the file and sets the cursor position on
the line. The context menu also provides option to copy contents
and option to clear the view.

Change-Id: I161de392ba35e37d323b049371619b01c617c798
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-27 11:01:13 +01:00
Kai Koehne
d75d70c552 Debugger: Fix "attach to QML port"
In this case we don't get any application output / message
telling us that the server is waiting, so let's try to connect
directly.

This is a regression introduced in commit 742019e301

Change-Id: I85d9f846c72e8b227dae5d6e847ab9366a34e2cc
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-02-27 10:13:42 +01:00
Kai Koehne
742019e301 Debugger: Fix QML-only debugging on Harmattan
Actually wait for the 'Waiting for debugger on port ' ... message
to appear in the application output before connecting, and also
use the port specified there.

Change-Id: Ib498e5306bc49f2f3d468353b1c5d1ea38a809e6
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
2012-02-23 15:46:46 +01:00
Aurindam Jana
9720c0d737 QmlDebugging: Show Object Tree in Console
Show QML/Javascript objects as a tree when
evaluated in the console.

Change-Id: I42901bf9bda3f18fb9fb1ca309a8370ccbe37c0a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-02-21 12:51:42 +01:00
Aurindam Jana
147396d764 ScriptConsole: Refactor to QtMessageLogWindow
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>
2012-02-20 17:51:05 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Kai Koehne
fe8cead2d0 Debugger: Make language to debug (QML/CPP) explicit
Make the choice of language part of the DebuggerStartParameters,
instead of deriving it indirectly from the current project. This
prevents e.g. the QmlCppEngine to be used when loading core files.

Change-Id: I9d1c9ab318ba789abe3a6ea0478ebda71857e793
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-01 12:14:02 +01:00
Kai Koehne
2a02841383 Debugger: Simplify handling of requestRemoteSetup in QmlCppEngine
Just emit the requestRemoteSetup on your own in QmlCppEngine. Also
properly check the related state transitions in DebuggerEngine.

Change-Id: I15dc4236303911126de7eee63ed996bdd8e5c5a8
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-31 14:14:05 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
hjk
7201923562 debugger: move isCppBreakpoint to Breakpoint
Change-Id: I241401fa010166982e5a95a699c99fbaa87188ef
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-24 17:10:28 +01:00
Kai Koehne
079fc49e91 RemoteGdb: Fix setup for attaching via dialog
Fix regression introduced in 9e8f935a while at the same time decoupling
the 'useServerStartScript' setting from whether the engine uses
requestRemoteSetup, or not.

Task-number: QTCREATORBUG-6841
Change-Id: I0850ec60e0f45ac66ba6736bcb9f75fdf73c1d23
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
2012-01-23 16:19:53 +01:00
Kai Koehne
fc2d8deae3 QmlEngine: Move setup logic from setupInferior to setupEngine
This is more in line with e.g. the gdb engine, which also emits
requestRemoteSetup in setupEngine().

Change-Id: I1c2a4c56d6f190a3043ea8a18d2bb28c9d340826
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-01-17 10:53:16 +01:00
hjk
496e9fafd0 debugger: replace static capability check by something potentially dynamic
This does not yet use the potential.

Change-Id: I087311fb7d59b46e49f65a84c4420c72a1227ebb
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-01-16 16:33:43 +01:00
Aurindam Jana
641716bee3 QmlDebugging: Implement RunToLine capability
Change-Id: I153c30310ac318d2de8b9a96c6d1e7f80439d306
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-09 10:53:19 +01:00
Friedemann Kleint
ec49390052 QML-Debugger: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: Id6f437c54504f6730c8726264f460b8f1631899d
Reviewed-by: hjk <qthjk@ovi.com>
2011-12-21 13:48:21 +01:00
Aurindam Jana
19b539c995 Debugging: Reload Script Scources
Update open editors when internal sources are reloaded.

Change-Id: If0780ac5fbbcd2a19c95dd5647d47cb70a9135e0
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-21 10:45:56 +01:00
Aurindam Jana
a2d5cb3534 QmlEngine: Source Files
Check for open editors with same display name before creating
a new editor to show the internal sources.

Change-Id: I53b365fb6c29d33922936bb4eb4dfb9476d5978e
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-12-21 10:25:26 +01:00
Daniel Molkentin
4ebc7a3092 Compile with Qt 4.7 again.
Change-Id: I627472151484d3b0b75b2030d3627d40f8c051f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 19:28:11 +01:00
Kai Koehne
cd63f3865f Debugger: Populate "Source Files" for QML, showing shadow .js structure
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>
2011-12-20 15:57:57 +01:00
Kai Koehne
8ae8ed1c11 Debugger: Remove duplicate messages in debugger log
Change-Id: I3ef833ac3550a59c5c5b3b5a5adda60a850863be
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-07 11:26:50 +01:00
Kai Koehne
80d3ebedca QmlDebugger: Make sure v8 messages show up in the debugger log
Change-Id: Icd65cde2bcb09eaa35cf67399e60e9d9f4484105
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-07 11:26:41 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Kai Koehne
8f7411fdad Unify parsing of application output in Debugger and Profiler
Change-Id: I8711f39aa44fea7d1a7091a27d77f5e73d5e4291
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-11-01 17:04:15 +01:00
Kai Koehne
eb5a60db14 Debugger: Don't expect that debug output arrives line by line
Sometimes multiple lines arrive at once through the debugger API. Handle
this gracefully for QML engine output tracking by buffering incomplete lines.

Change-Id: I295cf88d1aeb1737aa46e0a9e7ebedb7562e94e4
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-11-01 15:08:26 +01:00
Eike Ziller
81cce8902e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	qtcreator.pri
	src/libs/qmljs/qmljscheck.cpp
	src/plugins/debugger/gdb/gdbengine.cpp
	src/plugins/debugger/gdb/remotegdbserveradapter.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/buildmanager.cpp
	src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp

Change-Id: Id2dcebf95b94dc46c1d85908ba1d1378aaf362ac
2011-10-28 10:17:44 +02:00
Aurindam Jana
f3c047a33c QmlV8DebuggerClient: Refactored code
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>
2011-10-27 12:06:42 +02:00
Aurindam Jana
a0134647c3 QmlEngine: Engine State transitions
Rectify wrong state transitions for "Attach to QML Port".

Change-Id: Ife55344fb5089513743ff14f6bb5f2cabeed0adb
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-27 11:20:27 +02:00
Aurindam Jana
705472d3d9 QmlEngine: Activate selected frame only in specific states
Selecting a row in stack window activates the frame only if the
state is InferiorStopOk or InferiorUnrunnable, as followed by
gdbengine.

Change-Id: Iad6a16816c0ffd634572f26e1dcf8c3c577502db
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-18 10:32:00 +02:00
Eike Ziller
8eb8368139 Merge remote-tracking branch 'origin/2.4'
Conflicts:
	qtcreator.pri
	src/libs/qmljs/qmljstypedescriptionreader.cpp
	tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp

Change-Id: Id032187023bb42f259a87545ceeb3c965dd01a32
2011-10-17 14:22:32 +02:00
Kai Koehne
17ecb5bb71 Debugger: Avoid "Could not connect ... QML debugger" warning for mixed debugging
There's a race condition between the QML Engine trying to connect after the app printed
"Waiting on debugger port ...", and any possible Cpp breakpoints stopping the app.
Therefore, don't annoy the user with "Could not connec to QML Debugger" warnings
while the Cpp debugger is stepping.

Change-Id: I77f6f98e835e45363c5d47e10b39df249f65a1a3
Task-number: QTCREATORBUG-6249
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-10-13 17:22:44 +02:00
Kai Koehne
f8700f19ae Debugger: Expose which languages (QML, C++, Any) an engine supports
Change-Id: Ia690b5cda84738c303ae7b6bd579e43313728525
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-13 17:21:49 +02:00
Kai Koehne
b684f662b1 Debugger: Ignore instruction-wise operator mode for stepping QML
Change-Id: Idfd703acb9876041916cc3b1a04b5c031af2c12b
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-10-13 13:24:33 +02:00
Kai Koehne
d2d3c6dd15 QmlCppEngine: Make sure that breakpoint markers get removed
resetLocation() called by DebuggerPlugin::handle* should automatically
reset the locations for stepping etc.

Change-Id: I3e20f93ade7f40e1e1f33b1b48b11522b59771f8
Task-number: QTCREATORBUG-6291
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-10-13 11:56:10 +02:00
Aurindam Jana
cb0b3424b3 QmlJSScriptConsole: Refactored ScriptConsole, added functionality.
The ScriptConsole is renamed to QmlJSScriptConsole. The console can be used
to evaluate expressions during a QML application debug session.
Changes:
* Console can be used even when application is not on a debug break
* The object context is the currently selected object in Inspector
* ContextMenu has a Clear option
* Multiple line expressions are supported
* Traverse Command History using up and down arrow keys

Change-Id: I4e1cd8763d60be43dbba395ead2a9a086d6bab7d
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-12 15:03:00 +02:00
Kai Koehne
7dc88639dc QmlProfiler: Allow user to specify a sysroot for "Attach to Port"
Change-Id: I943255e5a501610195e3758f9fbb42d127f15524
Reviewed-on: http://codereview.qt-project.org/6451
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-10-12 11:12:15 +02:00
Kai Koehne
732334a0b8 QmlCppDebugger: Decouple states of engines
The main engine now follows mostly the state of the gdb engine,
only if a breakpoint is hit/while stepping the state of the qml
engine is used. This allows us to hit C++ breakpoints at any time
(also when the qml engine hasn't been able to connect yet), and
also fixes the invalid transition warnings.

Change-Id: If67a56fd28b098952be2606d0a46e04c27835f66
Reviewed-on: http://codereview.qt-project.org/5897
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-04 16:00:15 +02:00
Aurindam Jana
3c61cbb5df Debugger: Change BreakpointOnSignalHandler to BreakpointOnQMLSignalHandler
Change-Id: Ic71299c38863cdb55862ced7348b2bdc9cf39555
Reviewed-on: http://codereview.qt-project.org/5743
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-09-30 16:19:17 +02:00
Aurindam Jana
dbfae9fb28 QmlDebugger: Attach to QML Port: Fix errors
Connect to user defined host and port. Increased maximum connection tries.

Change-Id: Ie72a9fb36e5178b64311753bd8a3fe20e6f62c3b
Reviewed-on: http://codereview.qt-project.org/4918
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-09-19 13:56:08 +02:00
Aurindam Jana
f05683ac7e JSDebugger: Enable break on events.
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>
2011-09-16 11:42:54 +02:00
hjk
c6a8b39a03 debugger: hard-code some qt5 related paths
This is not a final solution.

Change-Id: I19e7a99e1b056704864d27855197678a0d3fd10b
Reviewed-on: http://codereview.qt-project.org/5073
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-16 11:06:20 +02:00
Eike Ziller
b0efd44d20 Merge remote-tracking branch 'origin/2.3'
Conflicts:
	qtcreator.pri
	qtcreator.pro
	share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp
	src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
	src/plugins/remotelinux/remotelinuxruncontrol.cpp

Change-Id: I9c89ba9fa2928e14e148041f9001856dce47a20b
2011-09-15 11:50:29 +02:00