| 121 | } |
| 122 | |
| 123 | void IVariableController::setAutoUpdate(QFlags<UpdateType> autoUpdate) |
| 124 | { |
| 125 | Q_D(IVariableController); |
| 126 | |
| 127 | IDebugSession::DebuggerState state = session()->state(); |
| 128 | d->autoUpdate = autoUpdate; |
| 129 | qCDebug(DEBUGGER) << d->autoUpdate; |
| 130 | if (d->autoUpdate != UpdateNone && state == IDebugSession::PausedState) { |
| 131 | if (d->activeThread < 0 || d->activeFrame < 0) { |
| 132 | // Cannot update variables for an invalid thread or frame. Our handler of the event |
| 133 | // thread_or_frame_changed will update variables once the current thread and frame become valid. |
| 134 | qCDebug(DEBUGGER).nospace() << "skipping initial update of variables because the current thread (" |
| 135 | << d->activeThread << ") or frame (" << d->activeFrame << ") is invalid"; |
| 136 | return; |
| 137 | } |
| 138 | update(); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | IVariableController::UpdateTypes IVariableController::autoUpdate() const |
| 143 | { |