March 22, 2019 11:01 by
Peter
Every developer who uses Visual Studio should know or be familiar with the shortcuts which I am going to share here. I hope it will be helpful to the freshers and even the experienced software developer friends.
Visual Studio Shortcut Keys and Tips
- Every developer should learn the difference between the concept of running an application in normal mode and in debug mode. Most of the freshers do not know this concept and run the application using F5 or clicking the RUN button in the menu bar of Visual Studio. But when it comes to the performance of Visual Studio and speed, we should know that F5 is used for running the application in debugging mode and for running the application without debugging, it is Ctrl+F5.
So, in simple words, if the developer wants to start the application in debugging mode, press F5; otherwise press Ctrl+F5.
- To put the breakpoints in the code use F9. For this, we have to put the control at the specific line of code and press F9. Debugging is basically used to check the result or see the values which is coming as per expectation. Now if we run the application the control will come to that specific control and then we can see whether the values are coming as per our expectation or not. If it is the method then we have the concept of step in and step out. We use step in to get into that specific method and to inspect the values in the method; for this we use F11. Step Out is used to see the output of the method, and the F10 key is used.
- As a developer, it is very important to write the code in proper format but most of the developers do not follow it (laughing) as their mind and soul waits to complete the task or module. But after some time of development of the code, they feel that the code should be formatted properly for the sake of better understanding and to troubleshoot (i.e debugging). For that purpose Visual Studio has a formatting concept through which we can format the document. To format the document we can use Ctrl+K,d.
- Sometimes, we write code which is not used at present but maybe it will be needed for some other cases or for some specific attribute afterward for any specific conditions. We can comment the code by using Ctrl+K, C which will comment on the selected code.
- To remove a comment for the specific code, we can use Ctrl+K, U in Visual Studio.
Hope these small and useful tips will help you guys. I will provide more shortcuts for developers in the next blog.