How to turn ON visual studio debugger inline watch in vs 2015? - debugging

I saw some developer have visual studio inline watch without using any third party plugin. I searched in settings to turn this ON but I can not understand what option will allow me this.
I can get this feature using Entrain Inline watch but this is a paid software and I know the visual studio has a built-in feature for this. Can you let me know how can I turn this on?
See the screenshot, I can see the variable values in line using entrain third-party plugin but I want to use the visual studio's built-in option

For future referrence, I would like to share one tool that I have found useful, that is Entrian Inline Watch visual studio extension, very useful.

I'm afraid the answer is negative.
For now, Visual Studio2015 doesn't support for watching inline values in debug mode.Please check this document,it describes several ways to watch values in debug mode without using third-party plugin.
I saw some developer have visual studio inline watch without using any
third party plugin.
As I know, VS2015 doesn't have this option. But VS Code seems to support this feature now. I'm not sure if the developer you mentioned has some extension like Resharper or what. It also provides this feature like Entrain Inline watch.
If you have a requirement to achieve this feature in VS2015, I suggest you post your suggestion on DC by Help=>Send feedback=>Provide a Suggestion, if it gets enough votes, the product team would consider it.

Related

Enabling opening and closing tag guidelines in Visual Studio

I've recently started using Visual Studio quite heavily since starting to develop in .Net
I really like the intellisense as it increases my productivity by allowing me to code faster. Previously when authoring CSS I would just use Notepad ++ and I got very used to some of the little features that this awesome text editor possessed however, now that I am doing the bulk of my work in Visual Studio 2013 I want to try and avoid having too many environments open at once. With this in mind, there is one feature inparticular that I would like to try and replicate in Visual Studio when editing CSS or indeed any other type of code.
In Notepad ++ it automatically includes a sort of guideline which runs down the page between the opening and closing tags of elements as shown below:
My question is, how do I replicate this behaviour in Visual Studio 2013 as the currently setup I have at the moment isn't as clear/productive as you can see below:
Any help would be greatly appreciated.
There are a couple of free extensions you can use to do this. These will run on any of the Visual Studio versions except Express, which does not support extensions.
You can duplicate this with the Indent Guides extension.
You can also use the Structure Visualizer Feature of the Productivity Power Tools.
Note: The backgrounds in the example are different because they are taken on different machines with different themes.

How to extend CodeLens

I'm currently writing a tool to help maintain unit and integration tests (coded tests). I've started extending Visual Studio to make the developer experience nicer, which got me to notice the new-ish CodeLens feature.
The stuff I'm currently showing as a tooltip should probably actually be part of the CodeLens info.
Question: Does anyone know how to extend CodeLens in Visual Studio?
Thanks.
As #RichardBanks says, officially CodeLens is not extensible. Technically I think it may be possible at the moment. Look for *CodeSense*.dll in the visual studio directory for hints. There is no documentation at present and the API can still change going forward.
I suggest you'd venture into this for research purpose only, distributing any 'plugin' seems like a very bad idea until Microsoft opens up the API, which they probably will.
CodeLens is officially extensible since Visual Studio 2019 was released.
CodeLens for Everyone
CodeLens has been a feature found only in Visual Studio Enterprise, but that will change in an upcoming preview of Visual Studio 2019, when it will also be available for the Community edition, likely in 2019. CodeLens shows the number of references a type or method has, information about unit tests covering the method, and data directly from Application Insights.
In addition, Microsoft has made CodeLens fully extensible1, so third-party extensions can start to add their own experiences on top of it. CodeLens makes key information about your types easy to find, while keeping you in the source code. Lenses for source control history and IntelliTrace are still an Enterprise-only feature.
Looks like this is the best place to start looking at when implementing your own CodeLens extension.
1. Highlight mine.
Code Lens is not currently extensible.
I can't say for sure, but I think there are still some features the team wants to add before they open it up for extension (e.g. git support).

Can I disable all compilation in Visual Studio?

This is a new one for me. I have been asked, for legal reasons, to setup a laptop with Visual Studio, but to disable the ability to compile projects/solutions. The purpose is to enable browsing of the source code, but not allow building or executing it.
Yes, I know this is really a stupid question and unfortunately I can't get into too many details. I've asked about using alternative text editors, but I have been told no. So until I can prove it isn't possible (or that I have at least made a reasonable effort), I have to try and make this work. Notepad++ would be an excellent alternative, but that has been rejected.
This would be in Visual Studio 2010 or later. Is there any way that I can do this?
UPDATE
After trying Marius Bancila's suggestion of removing the compilers and MSBuild, I was surprised to find out that VS continued to work fine (except for building, of course). I did not expect that functionality like F12 (Go To Definition) would continue to work.
This may mean that there still remains the ability to build something somewhere somehow. But as it stands with MSBuild permanently deleted and the Visual Studio Build command not working, it'll take some effort to get around it (if a way in fact does exist).
You didn't say what projects should not be possible to build (VC++, VC#, VB.NET, F#, etc.). Starting with VS2010 they are all built using MSBuild. So if you delete MSBuild they will not be able to build from inside Visual Studio. However, one can still be able to build from the command line, so the only possibility I see is that you delete all the compilers that come with Visual Studio.
It's a little bit crazy, but if you really have to ...
Try deleting some important binaries after installing Visual Studio e.g. linker (link.exe) and compiler (cl.exe).
Use a text editor instead. Notepad++ even comes with color syntax highlighting.
You cannot prevent people from compiling the code. Visual Studio Express is available to anyone, and the compiler can be executed from the command line, without Visual Studio's help.

Visual Studio Find All Not Referenced

In Visual Studio is there an automatic way to search over file(s) and find all classes/properties/methods that aren't referenced. Essentially abandoned code.
I don't want to manually have to right click on each and select "Find All References"
This is not a feature of Visual Studio in the current version. Using Roslyn you could code and Inspector yourself, but Roslyn doesn't offer one out of the box either at the moment. The walk-through on Semantic analysis should get you started. The roslyn forum is a good place to seek help or find examples, and there's a well monitored tag on StackOverflow as well of course.
Productivity plugins like Resharper and Code Rush offer this for sure. There are other similar tools that might have this feature JustCode, VisualAssist, CodeItRight are likely candidates.
You can also use something like Visual NDepend to detect unused methods. Their new command Linq to Code features should make it relatively easy to build a commandline tool that fishes out all unused calls.
A bit late but if you install SSDT (Sql Server Data Tools) this also add grayed reference count to each method in visual studio.
Note: This is actually "code lens" which is no longer available for VS2015. Installing the SSDT is the way you can have "code lens" in VS2015.

How to make Roslyn Syntax Visualizer Extension work?

When Roslyn installed, it comes with a couple of great demo tools. Firstly, the most valuable I think for those who want to learn syntax trees more thoroughly is the Syntax Visualizer Tool Window which shows the syntax tree of active *.cs files.
Everything worked fine when I launched this extension and tried it in a test instance of Visual Studio. But when I have installed this extension, it's not working anymore. I still have View -> Other Windows -> Roslyn Syntax Visualizer but just an empty window tool pops up.
Does anyone have the same problem and know the solution?
I guess that maybe I need to copy DLL files which this extension produces when rebuild but I don't know where should I put it.
Later I found another interesting detail - when I launch my own extension, Syntax Visualizer Tool works! So, it works only in test instance of Visual Studio. Why it should be like that?
The Syntax Visualizer only works when you are running Visual Studio with Roslyn enabled. When you start a test instance of Visual Studio, Roslyn is automatically enabled. Manually starting Visual Studio with Roslyn can be done by adding /rootsuffix Roslyn to the shortcut, but take care that Roslyn is not finished yet. It might not be advisable to enable it by default, depending on what you are working on. Of course, you can also just create another shortcut with Roslyn, so you can choose which one you want.
If you see [Roslyn] in your code tabs in Visual Studio, then you can use the visualizer. Another way of verifying if Roslyn is enabled is to view your extensions. The Roslyn Language Services has to be there for it to work. If this is not the case, then the visualizer can be opened, but it won't show any contents.
You can find more information about the visualizer extension here.
Nico most likely has the answer. Look in the Debug properties of the Syntax Visualizer project to see that it is launching with /rootsuffix Roslyn. Also, without launching this way, you should be able to see the Syntax Visualizer in the C# REPL and C# Script editor windows; as these are Roslyn CSharp editors.

Resources