Commit Graph

1461 Commits

Author SHA1 Message Date
Eike Ziller
631e2ea3e4 Force double-click activation for breakpoints view
Since it also is used much for managing the breakpoints, i.e. selecting
and deleting with the delete key, and then single-click activation is
annoying since it moves the focus to the editor.

Change-Id: Ic05ec525f146e2363c4984095b9792973caa1ac6
Reviewed-by: hjk <hjk@qt.io>
2019-05-03 09:41:41 +00:00
hjk
84055b6315 Debugger: Remove unused variables
Change-Id: I404c6803bdc227e29a53db5a6f8fd3e0df5d0b06
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-24 07:07:28 +00:00
hjk
384ca4bdb8 Debugger: Fix "Attach to running process"
Change-Id: I3cef08621c40c87f52e20a229ab5e16f0bfa8bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-09 08:28:42 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00
hjk
5273ef2a8a Debugger: Re-organize dock widget persisting
Looks like the mainwindow cannot be convinced to handle multiple
sets of dockwidgets.

So switch back to a single set containing everything and keep
track of non-default visibility in the perspectives, and persist
these sets.

The following pass:

1.

 Start Creator with new settings
 Goto Debug Mode
 Move Break dock widget to right, switch on Global log widget
 Leave Creator
 Start Creator
 Goto Debug Mode
 Check: Debugger Selected, Break on right, Global log visible

2.

 Start Creator with new settings
 Goto Debug Mode
 Move Break dock widget to right, switch on Global log widget
 Switch to QmlProfiler sub-perspective
 Leave Creator
 Start Creator
 Goto Debug Mode
 Check QmlProfiler selected
 Switch to Debugger sub-perspective
 Check: Debugger Selected, Break on right, Global log visible

3.

 Start Creator with new settings
 Use any C++ test project
 Start debugging / stop at main()  (F10)
 Wait for stop
 Switch to Edit mode
 Switch back to Debug mode
 Check: Only "running" debugger dock widget layout present
  (not the normal + preset at the same time)
 Quit Qt Creator while this debugger is running
 Check: Shuts down without crash

4.
 Use any C++ test project
 Start debugging
 Switch to Debugger Preset perspective
 Start a second debugger
 Kill either instance
 Check: Application dies, Debugger Preset perspective gets displayed
 Switch to perspective of second instance
 Check: Perspective looks ok (docks visible as before)

Task-number: QTCREATORBUG-21083
Task-number: QTCREATORBUG-21669
Task-number: QTCREATORBUG-21668
Task-number: QTCREATORBUG-21813
Task-number: QTCREATORBUG-21851
Task-number: QTCREATORBUG-22110
Task-number: QTCREATORBUG-22169
Task-number: QTCREATORBUG-22189
Change-Id: Ic9eb41ff7699ac0f48a85e68376daa80b2b6847e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-04-05 15:53:51 +00:00
Alessandro Portale
4ff5157a24 Debugger: Provide a mode-bar sized icon for the "Debugger.Stop" action
That big Icon was always there, but unused. add it to the
"Debugger.Stop" (in addition to the toolbar sized one), so that it looks
good when it appears in the mode bar.

For the "Classic" variant, I needed to add a @2x variant of the non-flat
icon.

Change-Id: Iea7200c7821b3780ff11a17b3ec74c44e06ba8d1
Reviewed-by: hjk <hjk@qt.io>
2019-04-03 14:02:10 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
hjk
fb4d8b5a01 ProjectExplorer: Make kit aspects self-register
Also, construct the KitManager implicitly when the first
KitAspect is created. Ramp-down is still explicit and
somewhat odd.

Change-Id: If1506e1d0789ecabbaad2d8008851d0b42c5218b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-18 14:14:28 +00:00
hjk
4d5da2938a Debugger: Move perspective saving to a time where mode is active
It should not make and I do not observe a difference, but it seems
the better thing to do.

Change-Id: I1f1f9fba72c2b20f24ebde04cf4ec3711d77d476
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-18 09:56:11 +00:00
hjk
ceb0fe429d ProjectExplorer: Add RunControl::set{Kit,Target}
For cases where no genuine RunConfiguration is available.

Use it in the debugger for the cases triggered from the menu.

Change-Id: I5671f4f5db2547c4a7a70bd34292bb6ccc8e6bf4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:47:47 +00:00
hjk
efb7d8deb7 ProjectExplorer: Split RunControl constructor
Into a trivial bit and two setters. Plan is to use it only with information
that is truly there (e.g. kit/device only) at the user side without having
to invent a RunConfiguration "handle".

Also remove some dead code in the test runner.

Change-Id: I987881e41722178b14b91f973b84cbdb67a9f85e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:38:45 +00:00
Orgad Shaneh
cbfc6e522d Merge remote-tracking branch 'origin/4.9'
Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
2019-03-01 13:06:57 +02:00
hjk
ad606bfe1b Debugger: Show Global Log in top area by default
It's off by default anyway, and in case when one wants to see it
the previous position was not providing enough space.

Change-Id: Ie5c6f56f482a8ca59fd47a534bbae70721313e0b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-22 06:45:49 +00:00
hjk
317ab49793 Debugger: Code cosmetics
Move some constants to internalconstants.h or remove them entirely.

Change-Id: Iecd4def3b48130fb390bddf420da672d44e3d6b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-21 07:56:58 +00:00
Eike Ziller
6d43aaf134 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
2019-02-19 09:08:53 +01:00
hjk
4d81349825 Debugger: Don't let overlong filename stretch Creator window
Change-Id: I79cd3c471e09d04019833d09eea81d462ce477c9
Task-number: QTCREATORBUG-21885
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-18 14:55:08 +00:00
Christian Kandeler
ce19540b77 Move KitAspectWidget definitions alongside their KitAspects
A KitAspectWidget class is tightly coupled with the respective
KitAspect, and no one else ever needs to see any KitAspectWidget
subclass at build time.

Change-Id: I1883af3b054c225e1ff5dd913118715bfdbaacfc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 14:39:29 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
hjk
b93f21d87a Debugger: Clarify role of "Executable:" in Load Core File dialog
The file containing debug information is needed, this is typically
the executable, but other setups are possible.

Also make it a bit clearer in the code by using 'symbol' in a few
places that previously used 'localExecutable'.

Task-number: QTCREATORBUG-21910
Change-Id: I5c61bc03302c06baa58f82e1d5097f425f8936a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-02-04 13:47:10 +00:00
Eike Ziller
845af92889 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Iaec96f929230754b87b32c2588db5cac5acd8453
2019-01-21 08:54:49 +01:00
hjk
de076eb889 Debugger: Switch default positions of preset panes
The different default positions of the "Breakpoint Preset" and the
"Breakpoint" views seem to cause confusion. They are apparently
perceived to be the same, and people file complaints about position
switching.

Change-Id: I29104552291f4e7f057ff8765243592da0b4cf74
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-18 10:48:12 +00:00
Eike Ziller
3c5650e514 Add macOS touch bar support
Introduce a generic Utils::TouchBar that implements a touch bar for
macOS based on QAction. Touch bars can be nested, and one is set to be
the application's top level touch bar.

Also add an ActionContainer for the touch bar. That allows us to manage
the layout of the touch bar the same way we do with menus.

Since the touch bar is an input device with very limited space, a
command in the touch bar needs to be specifically styled for the touch
bar by setting either touchBarText or touchBarIcon (or both).

Touch bars can be nested by nesting the ActionContainers. A nested touch
bar ActionContainer needs to specify an icon and/or text to show in the
touch bar button that opens that sub-bar.

Commands are only shown in the touch bar if they are valid within the
current context.

Implementation-wise we cannot use the standard NSPopoverTouchBarItem for
nesting touch bar levels. We cannot hide items in the touch bar, because
hidden items still take up space in the touch bar. So we need to rebuild
the touch bar regularly. Since the items we show are very dynamic, every
time the items in the toplevel bar change because of a context change,
any opened sub-level touch bar closes. That is why we maintain a stack of
touch bar levels ourselves, replacing the main touch bar with the current
level, and managing opening and closing the levels manually.

This patch adds buttons for Help, Bookmarks, Header/Source, Follow
(Symbol), Decl/Def, and a sub-bar for the debugger actions.

Fixes: QTCREATORBUG-21263
Change-Id: Ib63e610f21a993f1d324fe23c83a7f2224f434ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-01-15 14:33:56 +00:00
Eike Ziller
71d60ee9c8 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I522f91de70aff28692d7c3a050e8d52df0b82a76
2019-01-15 08:40:23 +01:00
hjk
fc58cb88c0 Debugger: Fix "Debugger font size follows main editor"
... for the ex-snapshot-now-engine-manager view.

Task-number: QTCREATORBUG-21803
Change-Id: I0c0a6199fa1dabc5c045fe6d0740de458dc63cda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tim Blechmann <tim@klingt.org>
2019-01-10 13:36:49 +00:00
Aaron Barany
21c0f5395e Debugger: Fix sizing of debugger columns
Added span column property to BaseTreeView. This takes an index to a column
that will span remaining space not explicitly taken by the other columns.
This listens to resizing of the tree view and columns that are manually
resized to keep the sizes consistent.

The stack view now once again uses the StackView class, which now sets the
function column as the span column. This will adjust the column size the
first time stack frame contents are encountered. It will not resize
automatically until it's re-created (the next debug session) so it doesn't
undo custom resizing. This also restores the ability to toggle stack
addresses. Some obsolete parts of this class were removed as part of
retrofitting it for the current state of the debugger.

Stack, breakpoint, and thread views now resize remaining space for the
function column rather than empty space at the end. This is generally the
most important field when debugging and can get very long, especially in
C++.

Task-number: QTCREATORBUG-21763
Change-Id: I821c83d1d951f3311d7fa9fcddcbdeedfeed1573
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-08 18:43:44 +00:00
Eike Ziller
8770d83fc8 Add general UI introduction
Adds a Help > UI Introduction, which highlights basic aspects of the Qt
Creator UI.

The pages to show are defined in a format that can later move into a
text based configuration file like JSON. It specifies an optional object
name of a widget to highlight, a title, a brief description and a longer
description (potentially with tables, lists and other simple HTML).

Fixes: QTCREATORBUG-21585
Change-Id: Idb64c87e1d752bc24437588278093a96be0eeddb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-12-18 09:53:36 +00:00
Eike Ziller
9084ca73df Merge remote-tracking branch 'origin/4.8'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I87f47cecbb924064296a002fd9446a0627acad8e
2018-12-12 09:44:13 +01:00
Aaron Barany
77ad54a6ef Debugger: Remove obsolete function declation
Change-Id: Ic528f0a97341773093822089bcc66f096f5e2327
Reviewed-by: hjk <hjk@qt.io>
2018-12-10 18:42:00 +00:00
Eike Ziller
3d1d9aae2e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/winrt/winrtdevicefactory.cpp

Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
2018-11-19 10:00:18 +01:00
Robert Loehning
efe30bc5a5 Debugger: Fix translation contexts
Change-Id: Id41ba15a4f0f5956148661e3c329cbb36a373f48
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-14 13:21:17 +00:00
hjk
4d3fe76796 Debugger: Add some labels to the preset views
In the hope to make it more obvious what the new views are all about,.

Change-Id: I3abde8a12cb5ac1f532f3b453c8d73f36498ff3d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-14 09:47:52 +00:00
hjk
ad37ad1a86 Debugger: Fix cut-and-pasto
Amends c3f29684fab92a6b51dfaa59254a61c86ed4968a.

Change-Id: I19e7a9ce65780822f8a9718906acc68f6f7e7454
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-11-13 07:56:53 +00:00
hjk
6a043d32dc Debugger: Fix handling of some actions after multiinferior split
The pattern used is some inactive/invible global action with a
command to put in the menus, and per-engine action "overloads"
to reflect the active engine's state once there is an engine.

Task-number: QTCREATORBUG-21454
Change-Id: I861a42994849ef9f0b51fb7b1608f14fa7fa9d7c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-13 07:16:37 +00:00
Orgad Shaneh
423b7391dd Debugger: Remove unused function declarations
Amends 3b5ecac238
and 36b654567d.

Change-Id: I8e8b226f34297ec4d34edbcc63b93d0f5045bcf4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-12 06:40:27 +00:00
hjk
e3cc0ce694 Debugger: Simplify code
isReverseDebuggingEnabled() always returns true for GDB nowadays.

Change-Id: Ic5500a9b191dafc2e9893d75f584a6b304c43a8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-09 13:42:27 +00:00
hjk
03447f1734 Debugger: Code cosmetics
Remove dead code

Change-Id: I07c30fdd777f2bdaf7695d740448fffb65349e9c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-09 13:30:19 +00:00
hjk
05ba1a0ff9 Debugger: Move some constants to more local scopes
Change-Id: I1b8b7ca594e4425c272ea092d915482f596698b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-09 13:30:11 +00:00
Eike Ziller
3666e3aaeb Merge remote-tracking branch 'origin/4.8'
Conflicts:
	tests/unit/unittest/unittest.pro

Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
2018-11-09 13:30:40 +01:00
Alessandro Portale
e5da4a791c Debugger: Use the toolbar version of start debug icon on the toolbar
Change-Id: Iac38599ead4851f5aac978d7484f0b230809f7ac
Reviewed-by: hjk <hjk@qt.io>
2018-11-09 09:14:45 +00:00
Eike Ziller
1473bc5891 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggermainwindow.cpp
	src/plugins/qbsprojectmanager/qbsbuildstep.cpp
	src/plugins/winrt/winrtdevicefactory.cpp
	tests/unit/unittest/gtest-creator-printing.cpp
	tests/unit/unittest/gtest-creator-printing.h
	tests/unit/unittest/unittest.pro

Change-Id: Ie9b80b87a8a4fa81baf72a2daa7919b21371c15e
2018-11-06 09:20:00 +01:00
Eike Ziller
183cfb0772 Make the currently visible debugger UI define the behavior of F5
That fixes the behavior of F5 for the debuggers which were not started
directly with a run configuration (attach, debug external application).
It has the disadvantage that it is only possible to start another
application in the debugger after switching to the "Debugger Preset",
even after you switch the startup project.

Fixes: QTCREATORBUG-21261
Change-Id: Id4d4c81920939af2b34b462d87c815719bed6aff
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-11-05 17:44:04 +00:00
Eike Ziller
1c17ed6db8 Debugger: Use engine specific contexts for delegating actions
Some actions that are engine specific are visible globally in the Debug
menu, like stopping, interrupting and continuing the debugger, and
various step variants.
These are registered in the action manager by the debugger plugin.

Avoid duplicating the state management of these actions in the debugger
plugin, by registering these actions as disabled dummies.
The actual actions of the specific debugger run are now registered in
the action manager by the debugger engine instance, for a debugger
engine instance specific context.
The engine manager sets the engine instance specific context when the UI
is switched to the specific debugger run.

Change-Id: I0a311cec0856365b830460dec2ce33d14a2289c0
Reviewed-by: hjk <hjk@qt.io>
2018-10-25 12:58:25 +00:00
Eike Ziller
fd7cba88ef Merge remote-tracking branch 'origin/4.8'
Conflicts:
	doc/src/editors/creator-only/creator-code-pasting.qdoc
	src/plugins/android/androidbuildapkwidget.cpp

Change-Id: Iea8b7135643d14ffe49d10b14bedb8fa5ac48063
2018-10-24 13:58:45 +02:00
Robert Loehning
d68c2e5f68 Debugger: Remove wrong white space
Change-Id: Ie3f9ebf0da7eb62748584e691495f4805e2faab0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-22 14:28:22 +00:00
Eike Ziller
95db30bd3a Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggeritem.cpp
	tests/unit/unittest/unittest.pro

Change-Id: Id2e4e9c2bc87b2556d7c2845aea3fe2fa11b630b
2018-10-22 09:53:54 +02:00
hjk
32b4dbbd84 Debugger: Use actions in different contexts
... for F10-as-in-Start-and-break-at-main and F10-as-in-step-over.

Change-Id: Ie8e9e9be389a09a1485cadeea8b2d035a130920a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-17 10:50:23 +00:00
hjk
fa96f73192 Debugger: Rework step{In,Out,Over} handling
Main menu action pass operation to current engine, everything else
is handled there.

Combine execute{Step,Next} and execute{Step,Next}I functions.
Implementation were mostly similar, in some cases unneeded
(the instruction-wise version e.g. for Python)

Drop GDB-isms 'step', 'next' in favor of 'step in' and 'step over'.

Change-Id: I232232bc7a67d9d297a74f1c81dc43be96787d34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 10:34:31 +00:00
Eike Ziller
3f3ba92fe9 Fix debugger "step into" icon
Fix-up of 3b5ecac238

Change-Id: I0c9197e4c1cf62ccdb57710af00189b32c850fd5
Reviewed-by: hjk <hjk@qt.io>
2018-10-16 05:13:09 +00:00
Orgad Shaneh
147a3c27c4 Debugger: Strip QLatin1* where possible
Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:32:31 +00:00
hjk
36b654567d Debugger: Finalize moving Operate by Instruction to engines
Fixes: QTCREATORBUG-21211
Fixes: QTCREATORBUG-21212
Change-Id: I6c0259052336f2141462157c319abeaec9a1e483
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-05 12:54:44 +00:00