Book Image

Python Tools for Visual Studio

Book Image

Python Tools for Visual Studio

Overview of this book

Table of Contents (13 chapters)

Visual Studio panels with PTVS


Visual Studio offers lots of standard tool windows to control the structure and workflow of your application. The main tool windows are Solution Explorer, Properties, Find Symbol Results, and Object Browser, as shown in the following screenshot:

To the right, we have the Solution Explorer window. It provides a glimpse of the structure of the current solution. In Visual Studio, a solution is a bundle of projects. In the Solution Explorer window, not only can you manage the different source files of the projects, but also configure the Python environment and the packages used in it (i.e. references and dependencies).

Besides the file structure of the project, the Solution Explorer window also provides a class view, which shows an overview of all the classes and structures (i.e. fields, properties, and methods). This is a quick view of the more complex window, Object Browser, which is visible in the middle of the screenshot. This window is accessible through the Object Browser menu item under View (or using the Ctrl + Alt + J shortcut). The two tools together provide a manner to browse and navigate the object structure of your code.

Under the Solution Explorer window, we can find the Properties window that shows the properties related to various objects of your projects such as the single source code files in it. It also shows more detailed information, for example, the path, and how it has to be managed in the built system of the files.

The most important and powerful window we have in PTVS is the source code window, which is where any programmer spends most of his/her time. It provides multitab source code navigation; every pane is a single source code file:

In each pane there are two comboboxes. The left one provides the function to navigate between classes in the file; the right one provides the function to navigate between methods of the selected class. In the source code window, Visual Studio unleashes much more powerful tools such as refactoring, IntelliSense, and code traversing, which we will explore in depth in the next chapters.

There are other windows that will become clearer during our exploration of PTVS in the coming chapters, such as the Find Symbol Results window at the bottom of the screenshot. That window shows the result of a search command or the list of references of a given code element, like a method, class, or property.