diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index a14762921943c01729419b7afa907dcce71539de..0bee5f811b8fa97bc6abb72fbd0f06a38dbce60a 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1575,8 +1575,11 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project) m_interruptAction->setEnabled(false); m_continueAction->setEnabled(false); m_exitAction->setEnabled(false); - m_startAction->setEnabled(true); - m_debugWithoutDeployAction->setEnabled(true); + ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance(); + const bool canRun = pe->canRun(project, DebugRunMode); + m_startAction->setEnabled(canRun); + m_startAction->setToolTip(canRun ? QString() : pe->cannotRunReason(project, DebugRunMode)); + m_debugWithoutDeployAction->setEnabled(canRun); setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG)); }