debugger: make F10/F11 start the app if not running and break on main

This commit is contained in:
hjk
2011-05-02 18:22:32 +02:00
parent 8dd71a9199
commit ccffed9385
5 changed files with 46 additions and 19 deletions

View File

@@ -654,7 +654,7 @@ DebuggerRunControlFactory::DebuggerRunControlFactory(QObject *parent,
bool DebuggerRunControlFactory::canRun(RunConfiguration *runConfiguration, const QString &mode) const
{
// return mode == ProjectExplorer::Constants::DEBUGMODE;
return mode == Constants::DEBUGMODE
return (mode == Constants::DEBUGMODE || mode == Constants::DEBUGMODE2)
&& qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
}
@@ -761,8 +761,10 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
RunControl *DebuggerRunControlFactory::create
(RunConfiguration *runConfiguration, const QString &mode)
{
QTC_ASSERT(mode == Constants::DEBUGMODE, return 0);
QTC_ASSERT(mode == Constants::DEBUGMODE || mode == Constants::DEBUGMODE2, return 0);
DebuggerStartParameters sp = localStartParameters(runConfiguration);
if (mode == Constants::DEBUGMODE2)
sp.breakOnMain = true;
return create(sp, runConfiguration);
}