diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 36c94f76bf37c2251d75751999ec5ee152df9164..495f28af0fb5a2b97d07b5c1413e5a00288f4175 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -70,6 +70,8 @@ CommonOptionsPageWidget::CommonOptionsPageWidget m_ui.checkBoxCloseBuffersOnExit); m_group->insert(dc->action(SwitchModeOnExit), m_ui.checkBoxSwitchModeOnExit); + m_group->insert(dc->action(BreakpointsFullPathByDefault), + m_ui.checkBoxBreakpointsFullPath); m_group->insert(dc->action(RaiseOnInterrupt), m_ui.checkBoxBringToForegroundOnInterrrupt); m_group->insert(dc->action(ShowQmlObjectTree), @@ -116,6 +118,7 @@ QString CommonOptionsPageWidget::searchKeyWords() const << sep << m_ui.checkBoxFontSizeFollowsEditor->text() << sep << m_ui.checkBoxUseToolTipsInMainEditor->text() << sep << m_ui.checkBoxListSourceFiles->text() + << sep << m_ui.checkBoxBreakpointsFullPath->text() #ifdef Q_OS_WIN << sep << m_ui.checkBoxRegisterForPostMortem->text() #endif diff --git a/src/plugins/debugger/commonoptionspage.ui b/src/plugins/debugger/commonoptionspage.ui index 548ed122da80bc102ed325f50e5d112cd6d585d2..d31e3c85ec435eaaf58c776c775c2cae11cdd96c 100644 --- a/src/plugins/debugger/commonoptionspage.ui +++ b/src/plugins/debugger/commonoptionspage.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>691</width> + <width>765</width> <height>341</height> </rect> </property> @@ -65,7 +65,44 @@ </property> </widget> </item> + <item row="3" column="0"> + <widget class="QCheckBox" name="checkBoxBringToForegroundOnInterrrupt"> + <property name="text"> + <string>Bring Qt Creator to foreground when application interrupts</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QCheckBox" name="checkBoxShowQmlObjectTree"> + <property name="toolTip"> + <string>Show QML object tree in Locals & Expressions when connected and not stepping.</string> + </property> + <property name="text"> + <string>Show QML object tree</string> + </property> + </widget> + </item> <item row="4" column="0"> + <widget class="QCheckBox" name="checkBoxBreakpointsFullPath"> + <property name="toolTip"> + <string>Enable a full file path in breakpoints by default also for the GDB</string> + </property> + <property name="text"> + <string>Breakpoints full path by default</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QCheckBox" name="checkBoxRegisterForPostMortem"> + <property name="toolTip"> + <string>Register Qt Creator for debugging crashed applications.</string> + </property> + <property name="text"> + <string>Use Qt Creator for post-mortem debugging</string> + </property> + </widget> + </item> + <item row="6" column="0" colspan="2"> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QLabel" name="labelMaximalStackDepth"> @@ -120,33 +157,6 @@ </item> </layout> </item> - <item row="3" column="0"> - <widget class="QCheckBox" name="checkBoxBringToForegroundOnInterrrupt"> - <property name="text"> - <string>Bring Qt Creator to foreground when application interrupts</string> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QCheckBox" name="checkBoxRegisterForPostMortem"> - <property name="toolTip"> - <string>Register Qt Creator for debugging crashed applications.</string> - </property> - <property name="text"> - <string>Use Qt Creator for post-mortem debugging</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QCheckBox" name="checkBoxShowQmlObjectTree"> - <property name="toolTip"> - <string>Show QML object tree in Locals & Expressions when connected and not stepping.</string> - </property> - <property name="text"> - <string>Show QML object tree</string> - </property> - </widget> - </item> </layout> </widget> </item> diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 354b87d4e21daa68df2fc3ac55115cdb4ba85fbd..8519f0f9c3a5ac805c0394b3451cf7a22a643763 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -409,6 +409,12 @@ DebuggerSettings::DebuggerSettings(QSettings *settings) item->setDefaultValue(false); insertItem(SwitchModeOnExit, item); + item = new SavedAction(this); + item->setSettingsKey(debugModeGroup, QLatin1String("BreakpointsFullPath")); + item->setCheckable(true); + item->setDefaultValue(false); + insertItem(BreakpointsFullPathByDefault, item); + item = new SavedAction(this); item->setSettingsKey(debugModeGroup, QLatin1String("RaiseOnInterrupt")); item->setCheckable(true); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index 2ace36819f7df3f70f545a717b45cdc683bb5d3f..c94721af4508eeb3e61cd2803202783cb4f01eb0 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -99,6 +99,7 @@ enum DebuggerActionCode OperateByInstruction, CloseBuffersOnExit, SwitchModeOnExit, + BreakpointsFullPathByDefault, RaiseOnInterrupt, UseDebuggingHelpers, diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 0fe1bf0e5fda19d872a0a7479d18cb79237214e6..caef2aac694083c34d95ea8a8c3fac03215102a8 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1907,6 +1907,8 @@ void DebuggerPluginPrivate::toggleBreakpointByFileAndLine(const QString &fileNam handler->removeBreakpoint(id); } else { BreakpointParameters data(BreakpointByFileAndLine); + if (debuggerCore()->boolSetting(BreakpointsFullPathByDefault)) + data.pathUsage = BreakpointUseFullPath; data.tracepoint = !tracePointMessage.isEmpty(); data.message = tracePointMessage; data.fileName = fileName;