It’s been a while since we released Python Tools for Visual Studio 2.1 (PTVS), and in that time the team has been working on Azure Machine Learning and the Python Client library. But we haven’t forgotten about PTVS. We’ve been working on some of the most popular requests from users, and today we are releasing the beta of PTVS 2.2 for Visual Studio 2013 (including free options Visual Studio Community Edition, Express for Web and Express for Desktop) and Visual Studio 2015 CTP 6.
PTVS 2.2 Beta has a number of new features that our users have been asking for, as well as plenty of fixes for some really annoying issues (the complete list is here). It's not quite ready for production use yet, but we'd very much like to hear feedback on how it's looking and to make sure that we’re making a tool that you'll love to use. Here are some of the highlights of the new release.
Task Comments
If you’re anything like us, you probably have little notes scattered throughout your code: things that you need to do later, things that you hope someone else will do later, and things that you know you probably shouldn’t have done. Our users have long been asking to see these all listed in the Task List window, and in PTVS 2.2 Beta you now can. The Task List window can be found in the View menu, and we’ll show the full list when Comments is selected in the drop down.
Python Environments window
Working with multiple versions of Python is important to our users, and nearly everyone wants to find and install the latest and greatest Python libraries. We've given the Python Environments a face-lift and added some new functionality. You can now easily view and configure all of your Python installations, open the Interactive Window, search PyPI for packages and install them, update packages you've already installed, and get more information about why IntelliSense isn't working for some libraries (sorry). We like it in the new tall layout, but if you make the window wide enough it will snap into a horizontal layout. Let us know which one you prefer and what other functionality you’d like to see here. You can open the Python Environments window through View, Other Windows.
Collapsible everything
This has probably been our most popular request ever, and so we've added it. Now you can collapse almost anything that spans multiple lines, no matter where they are in your code. This includes functions, classes, lists, dictionaries, loops, exception handlers, and even multi-line strings. We’ll also detect #region and #endregion (which are normally just treated like comments in Python) and you can collapse everything in between. If you find something we missed that you’d like to be able to collapse, let us know.
Code Snippets
You’ll often find yourself writing the same few lines of code over and over again, and so we've added Code Snippets to make this easier. You can insert any of the predefined Python snippets though the Edit, IntelliSense menus, or simply by typing a keyword like “def”, “try” or “class” and pressing Tab. You can also add your own code snippets for the things you need, and if you’d like to see them included in PTVS then you can share them with us on CodePlex.
Autos Window
It’s hard to beat a good debugger (and as many long-suffering Python developers will tell you, Visual Studio is a great debugger), and ours is getting better in PTVS 2.2. Along with support for breakpoint hit counts, we’ve also enabled the Autos window. Now, while you’re debugging, the Autos window will show you the values of variables and simple expressions near the current line. Every time you step, it will update with new values or new variables that are now nearby, so you don’t have to keep hovering the mouse or updating your Watch window.
Summary
These features and many more are available in PTVS 2.2 Beta, as well as lots of bug fixes and performance improvements. This is a preview release, so we recommend using it in a test environment. Feel free to give us feedback. We are active on CodePlex and also look at Visual Studio’s feedback tool. We appreciate all the feedback we’ve received on previous releases, and we'd really like to hear from our users.
You can download PTVS 2.2 Beta and our sample project packs from our CodePlex page. And like all of Microsoft’s other Python projects, PTVS is open-source and you’re welcome to contribute features, bug fixes, docs, or just feedback and suggestions.