It supports both syntax highlighting and intellisense, which works even better here since it can look at the live objects rather than having to analyse your source code. This is the same old familiar interactive IronPython interpreter you get when you type ipy.exe, except that it has a few tricks up its sleeve. However, the Locals window does come to the rescue and can be used to examine the contents of variables while you are at a breakpoint.Īnother great feature is the IronPython Interactive Window. Neither can you use Python variables or expressions for breakpoint conditions. Also you can’t get at variable contents using the Immediate or Watch windows. The only tooltips I could get up was by hovering over the open quotes of a string literal. Sadly tooltips showing the values of variables don’t seem to be implemented. You can set breakpoints and step through your code: One of the most compelling reasons to use Visual Studio to write your IronPython apps is support for the debugger. Search Path can also be configured in the Solution Explorer: You can also specify which your startup file is. It doesn’t have too many configuration options, but it does allow you to add search paths for external python scripts or. csproj is an msbuild project file under the hood). When you create an IronPython project it creates a regular. Also the Object Browser includes classes and methods from your IronPython source files. What I wasn’t expecting was intellisense, but it’s available in some places (though not everywhere since the dynamic nature of Python means you can’t guarantee that a variable will keep the same type that it was initially assigned).Īnother nice touch is red squiggly lines indicating syntax errors – very useful if like me you keep forgetting the colon at the end of if statements:Īlso the Navigation Bar is populated with the classes and methods in your source file:Īnother very nice touch is that the Find All References and Go To Definition both work.
HOW TO USE PYTHON IN VISUAL STUDIO 2010 CODE
The templates each have just enough code to get you started.Īs you might expect there is syntax highlighting for Python files:Īnother nice touch is that pressing backspace with the cursor at the start of a line of code moves it in one level of indentation. Project Templatesįour new project templates are included – these are a Console Application, a WinForms application, a WPF application and finally a Silverlight web page. Here’s a brief rundown of the features (at least the ones I’ve found). I’ve been trying out IronPython 2.7 beta 1, which includes Visual Studio 2010 integration and I’ve been very impressed.