Repository: microsoft/ptvsd

Issue:
Unable to copy, evaluate and add variables to watch window
## Environment data

- PTVSD version: Master
- OS and version: N/A
- Python version (& distribution if applicable, e.g. Anaconda): N/A
- Using VS Code or Visual Studio: VSC (https://github.com/Microsoft/vscode-python/issues/1398)

## Actual behavior

Variables in `Variables` window cannot be copied.

## Expected  behavior

Note: I have created Tests for this, we just need to enable a block of code.

## Expected  behavior

Should be able to copyt

## Cause
* The value for `evaluateName` is not returned for top-level variables
Source https://github.com/Microsoft/ptvsd/blob/master/ptvsd/wrapper.py#L1742
```python
            eval_name = self._get_variable_evaluate_name(pyd_var, var_name)
            if eval_name:
                var['evaluateName'] = eval_name
```

<img width="870" alt="screen shot 2018-07-02 at 1 49 24 pm" src="https://user-images.githubusercontent.com/1948812/42188587-67635bfe-7e09-11e8-82f1-82733c79d6a1.png">



Discussion:

Resolving patch:
diff --git a/ptvsd/wrapper.py b/ptvsd/wrapper.py
--- a/ptvsd/wrapper.py
+++ b/ptvsd/wrapper.py
@@ -1753,7 +1753,8 @@ def _is_raw_string(self, var_type):
     def _get_variable_evaluate_name(self, pyd_var_parent, var_name):
         # TODO: docstring
         eval_name = None
-        if len(pyd_var_parent) > 3:
+        pyd_var_len = len(pyd_var_parent)
+        if pyd_var_len > 3:
             # This means the current variable has a parent i.e, it is not a
             # FRAME variable. These require evaluateName to work in VS
             # watch window
@@ -1768,6 +1769,8 @@ def _get_variable_evaluate_name(self, pyd_var_parent, var_name):
                     eval_name += '[{}]'.format(i)
                 except Exception:
                     eval_name += '.' + s
+        elif pyd_var_len == 3:
+            return var_name
 
         return eval_name
 


Test patch:
diff --git a/tests/highlevel/test_messages.py b/tests/highlevel/test_messages.py
--- a/tests/highlevel/test_messages.py
+++ b/tests/highlevel/test_messages.py
@@ -449,12 +449,14 @@ class MyType(object):
             self.expected_response(
                 variables=[
                     {
+                        'evaluateName': 'ham',
                         'name': 'ham',
                         'type': 'list',
                         'value': '[1, 2, 3]',
                         'variablesReference': 2,
                     },
                     {
+                        'evaluateName': 'spam',
                         'name': 'spam',
                         'type': 'str',
                         'value': "'eggs'",
@@ -463,16 +465,19 @@ class MyType(object):
                         },
                     },
                     {
+                        'evaluateName': 'x',
                         'name': 'x',
                         'type': 'bool',
                         'value': 'True',
                     },
                     {
+                        'evaluateName': 'y',
                         'name': 'y',
                         'type': 'int',
                         'value': '42',
                     },
                     {
+                        'evaluateName': 'z',
                         'name': 'z',
                         'type': 'MyType',
                         'variablesReference': 3,