diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 35c78d94b6cc5cffb74cae99e2d6b0deef849ba4..2c16981558d99e40e160dfe689aaaa3bdf337f51 100644
--- a/src/plugins/debugger/debuggermanager.cpp
+++ b/src/plugins/debugger/debuggermanager.cpp
@@ -966,7 +966,10 @@ void DebuggerManager::exitDebugger()
 void DebuggerManager::assignValueInDebugger()
 {
     if (QAction *action = qobject_cast<QAction *>(sender())) {
-        qDebug() << "HANDLING " << action->data().toString();
+        QString str = action->data().toString();
+        int i = str.indexOf('=');
+        if (i != -1)
+            assignValueInDebugger(str.left(i), str.mid(i + 1));
     }
 }
 void DebuggerManager::assignValueInDebugger(const QString &expr, const QString &value)
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index f0d5a33a1fabc015fe041fd41cce17269345e94d..355417d81ed650cecae5f9599cc1edcc2c969197 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -440,9 +440,6 @@ QVariant WatchHandler::data(const QModelIndex &idx, int role) const
     const WatchData &data = m_displaySet.at(node);
 
     switch (role) {
-        case Qt::EditRole:
-            return data.exp;
-
         case Qt::DisplayRole: {
             switch (idx.column()) {
                 case 0: return data.name;
@@ -496,6 +493,9 @@ QVariant WatchHandler::data(const QModelIndex &idx, int role) const
             break;
         }
 
+        case ExpressionRole:
+            return data.exp;
+
         case INameRole:
             return data.iname;
 
diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h
index aed6b37566df0a77c3e61aabec1ad34367a122b3..4cac4a87f9942e4331882ce59cbba550524366ae 100644
--- a/src/plugins/debugger/watchhandler.h
+++ b/src/plugins/debugger/watchhandler.h
@@ -132,7 +132,7 @@ public:
     bool changed;
 };
 
-enum { INameRole = Qt::UserRole, VisualRole, ExpandedRole };
+enum { INameRole = Qt::UserRole, ExpressionRole, VisualRole, ExpandedRole };
 
 
 class WatchHandler : public QAbstractItemModel
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index f93a7fe7ec881e1cae759936ee7d0ca39ae47567..70f32cd48cb13207eef29c07724b14423aa94327 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -54,7 +54,7 @@ using namespace Debugger::Internal;
 //
 /////////////////////////////////////////////////////////////////////
 
-enum { INameRole = Qt::UserRole, VisualRole, ExpandedRole };
+enum { INameRole = Qt::UserRole, ExpressionRole, VisualRole, ExpandedRole };
 
 class WatchDelegate : public QItemDelegate
 {
@@ -71,7 +71,10 @@ public:
     {
         QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor);
         QTC_ASSERT(lineEdit, return);
-        lineEdit->setText(index.model()->data(index, Qt::EditRole).toString());
+        if (index.column() == 1) 
+            lineEdit->setText(index.model()->data(index, Qt::DisplayRole).toString());
+        else
+            lineEdit->setText(index.model()->data(index, ExpressionRole).toString());
     }
 
     void setModelData(QWidget *editor, QAbstractItemModel *,
@@ -80,7 +83,7 @@ public:
         QLineEdit *lineEdit = qobject_cast<QLineEdit*>(editor);
         QTC_ASSERT(lineEdit, return);
         QString value = lineEdit->text();
-        QString exp = index.model()->data(index, Qt::EditRole).toString();
+        QString exp = index.model()->data(index, ExpressionRole).toString();
         if (index.column() == 1) {
             // the value column
             theDebuggerSetting(AssignValue)->trigger(exp + '=' + value);