Live data from Hacker News

Python Tools for Visual Studio

hanselman.com

91–100 of 134 posts

Re: Python Tools for Visual Studio

#91

Earlier quoted context omitted.

Do you have specific examples? This is an area of interest for me. VS architecturally has a lot of things tied to the UI thread due to COM STA requirements (well, that and the fact that historically people created their STA objects on the UI thread, thus tying them to the UI thread). Another possible cause can be extensions. Not that VS doesn't have its own problems of 'doing too much work on the UI thread', but ther…

I don't have a specific example at the moment, except that it's often unresponsive during builds. (I guess this should be expected? Other work I do is in interpreted languages, so there is no "build" step) Thanks for the link. I'm happy to add it.

Well, I wouldn't say it should be expected during builds. In the past the build architecture was somewhat questionable, i.e. they ran builds synchronously on the UI thread, which works fine if your build takes like 50 ms :) I don't work on the project build team but I believe most languages now build off the UI thread, and any that have long sequences of activities they are doing on the UI thread should still be pumping to prevent UI lockup. That said, running your own pump in an app as complex as VS is...not something to be undertaken lightly, so it is possible their pumps are not correct or their 'in between pump' tasks are taking far longer than they thought/expected. If you can repro it even without repro steps I can give you some instructions on getting a perf trace I could take a look at, they generally point to the culprit pretty clearly.

Re: Python Tools for Visual Studio

#93
post #75

This doesn't even mention the most awesome feature of PTVS 2.0: mixed-mode debugging, which provides an integrated experience for debugging mixed Python/C processes. See https://pytools.codeplex.com/wikipage?title=Mixed-mode%20deb... for details. Disclaimer: I used to work on IronPython.

Microsoft really does make the most outstanding developer tools. I admit that I occasionally miss that deeply integrated, seamless feeling. You guys deserve some recognition. I'm not too frequent a user lately, but I'm continually impressed.

It is such a pity that so many of their awesome products are so windows centered.

Re: Python Tools for Visual Studio

#95
post #65
post #64

Earlier quoted context omitted.

Can you expand a bit on how that works in principle ? Can you make it work with a standard python or did you need to insert probes' into the python interpreter to catch when it goes form C to Python and vice et versa

VS 2012 added a new debugging framework for supporting debugging multiple code types at the same time. That model requires that the debugger work out of process - inspecting various data structures cross process and reporting them back to VS. That's different from how Python debuggers are usually built w/ sys.settrace and a debugger helper thread running in the process. To accomplish that we require that we have symb…

My understanding is that dual debugging works when your main process is oythin and you can the debug some C python module. Is ther a way to debug a C process loading python27.dll which then runs some pythin code using the oython-C api?

Re: Python Tools for Visual Studio

#96

Earlier quoted context omitted.

Do you have specific examples? This is an area of interest for me. VS architecturally has a lot of things tied to the UI thread due to COM STA requirements (well, that and the fact that historically people created their STA objects on the UI thread, thus tying them to the UI thread). Another possible cause can be extensions. Not that VS doesn't have its own problems of 'doing too much work on the UI thread', but ther…

I don't have a specific example at the moment, except that it's often unresponsive during builds. (I guess this should be expected? Other work I do is in interpreted languages, so there is no "build" step) Thanks for the link. I'm happy to add it.

Which version of VS, and what language? If you're using VS 2010 or earlier, then both C# and VB were running the build (MSBuild and compilers both) on UI thread, so responsiveness was as bad as you'd expect it to be with such architecture. From VS 2012 onwards, VB builds on a background thread, and C# builds out-of-process (which also makes it scale on multi-core systems).

Re: Python Tools for Visual Studio

#97

This made me remember about the "Visual Node" project[1], which is very similar to this but for node.js. I hope it's still being actively developed. [1]: https://news.ycombinator.com/item?id=5873351

If this project isn't still in development, Microsoft does treat NodeJS as a first class citizen in Web Matrix[1] and is definitely worth a look.

[1]: http://www.microsoft.com/Web/webmatrix/node.aspx

Re: Python Tools for Visual Studio

#98

There are a lot of Python IDEs out there, some very good, such as IntelliJ IDEA. I'd prefer to see an objective comparison.

It really varies from area to area, and each has something that others don't. E.g. PyCharm is unique in supporting Cython, PTVS is now the only one with mixed-mode debugging (don't you wish those two were married in one IDE? ~) etc.

In other areas like code editing, the differences are often qualitative. For example all Python IDEs have code completion, but try entering this in your favorite one:

  def f(x):
      def g(y):
          return x + y
      return g
  
  a = f(1)(2)
  b = f(3.0)(a)
  c = f(u'a')(str(b))
  d = (a, b, c)[input()]
And then see what completions it gives you for a., b. etc.

It would be interesting if some independent third party would do a detailed point by point study and published it.

Re: Python Tools for Visual Studio

#99

Earlier quoted context omitted.

I'm developping on some platforms. But i have to admit, nothing beats visual studio in awesomeness / completeness

I came into a shop that does a lot of .NET development over a year ago, and I swear I came into the experience hoping to learn what made lots of people say exactly what you've said. 6 months into it, I all but stopped caring, and overall, I felt like it actually created problems for me. But I'd like to understand what problems others feel it solved for them.

Honestly, coming into visual studio/c# from emacs/common lisp feels like going backwards in time for me.

Running my CL environment on Gentoo feels like the future; a not-quite-there-yet-but-still-awesome future; running VS on Windows feels like kiddie toys that haven't gotten around to growing up yet.

And that's a weird feeling when you realize the dollars, time, and research poured into each environment. :-)

Post reply on HN