dotnet / dotnet/vscode-csharp

[C# extension] Variable name and value isn't added to the watch window at the same time when adding variable to watch from Locals window

Open
#2,626 0 comments 0 reactions 0 assignees View on GitHub
Debugger OmniSharp
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

**Environment data**
OS and Version: Debian9.2.1
VS Code Version: 1.28.2
C# Extension Version:1.17.0-beta6

**Steps to reproduce**
1.Install vscode.
2.Install C# extension.
3.Open the Terminal, run as follow command to create new console project:
dotnet new console -o hwapp
4.Add some code in the program.cs:
picture1
![picture1](https://user-images.githubusercontent.com/32061365/47538923-630fb000-d900-11e8-998c-27aea8e8667f.png)
5.Compile project with command "dotnet build"
6.Open vscode, open hwapp folder, configure launch.json as following:
![picture2](https://user-images.githubusercontent.com/32061365/47538929-699e2780-d900-11e8-8f82-46805286959f.png)
7.Set a breakpoint in line 19, as picture1
8.F5, wait for hitting the breakpoint.
9.Go to Locals window.
10.choose a variable, eg: s1, right-click, select "Add to watch"

**Expected**
Variable name and value is added to the watch window at the same time.

**Actual**
Only variable name is added to the watch window. The variable value will not be displayed until you click another location or click "Enter"
![picture3](https://user-images.githubusercontent.com/32061365/47538946-7884da00-d900-11e8-8135-f194a3003b5b.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.