21 ms·
Node.js Tools for Visual Studio
- mousetraps 12y agoDev here - happy to answer any questions you have :)
- pdpi 12y agoGreat work, looks very nice. Will give it a whirl when I get home. In the meanwhile, I noticed that you support intellisense. What are the limitations to this? What patterns will get correctly picked up? I assume prototypal inheritance will work fine (of course), but will any of the BaseClass.extend()-style inheritance mechanisms that some frameworks seem to favour (e.g. Backbone) work? While we're at it, is the static analysis tools you built for this public? I'd love to have a look at them.
- Scuds 12y ago> While we're at it, is the static analysis tools you built for this public? maybe this? http://nodejstools.codeplex.com/SourceControl/latest#Nodejs/Product/Analysis/ http://nodejstools.codeplex.com/SourceControl/latest#Nodejs/...
- pdpi 12y agoLooks like it, yeah. Thanks!
- mousetraps 12y agoLet us know if you have any questions! There's some _really cool_ stuff going on there, but it can be tough to wade through depending on your experience.
- at-fates-hands 12y agoIs this going to make it easier to deploy NodeJs apps to Azure then? Love Azure, but had a hard time getting my NodeJS stuff up to Azure without some major issues.
- jongalloway2 12y agoIf you haven't already been in touch with someone to get this sorted out, can you e-mail me (jon.galloway at microsoft dot com)? Would like to make sure we're tracking and fixing any issues you ran into.
- chambo622 12y agoI gave up on deploying my node.js app to Azure after finding that several modules I was using were simply not possible to run on Windows. Wasn't worth the trouble to refactor and avoid these dependencies. Windows is not a priority for most node.js devs, so unless you're doing something pretty simple/mainstream, you're likely to run into trouble.
- tuna-piano 12y agoSame, and I gave up trying to get Node to work with SQL Server. Ended up at Heroku because of this.
- skrowl 12y agoThe node MS SQL bindings are still terrible, so I haven't really bothered much with Node because of it
- gabrielgiordano 12y agoVery nice work, I'll test it on my workflow by the next hours :)
- mousetraps 12y agoAwesome! Please, please, please let us know if you have any feedback!
- MichaelGG 12y agoWow this looks pretty amazing! How do you handle the super-long paths npm is so fond of? On Windows I often run into issues when searching or trying to manipulate a solution containing anything npm due to too-long paths.
- AdeptusAquinas 12y agoI have run into this problem as well. Manually modifying packages is not fun.
- mousetraps 12y agoSee my comment above, but if you do this frequently... we have a feature that enables you to right click on an installed npm package in the npm tree in Solution Explorer and open the relevant folder in explorer
- mousetraps 12y agoWe try to mitigate the issue in a few ways: 1) warnings when you hit max_path that offer to run 'npm dedupe' 2) sometimes that doesn't work, so we also suggest people start their projects in a short path like c:\src (embarassing, I know) 3) patiently await a flat node_modules directory - http://blog.npmjs.org/post/111968476155/npm-weekly-6 http://blog.npmjs.org/post/111968476155/npm-weekly-6 4) groan very loudly when it happens - no good keeping those emotions bottled up ;-) luckily #1/#2 cover most cases
- WorldWideWayne 12y agoI use a tool called flatten-packages [1] and I usually do all of my npm work while visual studio is closed (and use short root paths as mousetraps suggested). I just flatten them after adding/updating/syncing packages. [1] https://www.npmjs.com/package/flatten-packages https://www.npmjs.com/package/flatten-packages
- jongalloway2 12y agoThat's worked well for me, too. The biggest problem with long file paths is the deeply nested dependencies, so flatten-packages handles it for me.
- inglor 12y agoAny plans to make deployment of io.js easier to Azure websites? Also - any way we might get "break on exception" like with C#? Also - any plans to support debugging promises better?
- mousetraps 12y agoBreak on exception? Done! http://nodejstools.codeplex.com/wikipage?title=Debugging#break-on-exception http://nodejstools.codeplex.com/wikipage?title=Debugging#bre... We have SO MANY PLANS, so please upvote or request the ones you think are important :) https://nodejstools.codeplex.com/workitem/list/basic https://nodejstools.codeplex.com/workitem/list/basic
- angersock 12y agoI'd vote for the "Move to github", but (fittingly enough) I'm not going to create a codeplex account just for that purpose. :-\
- mousetraps 12y agoHaha, fair enough. Then I suggest you follow @NT4VS on Twitter. We'll let you know when it happens. :-)
- mousetraps 12y agoAlso re: io.js + Azure websites - looks like someone wrote a script to make it easier! http://azure.microsoft.com/en-us/documentation/articles/web-sites-nodejs-iojs/ http://azure.microsoft.com/en-us/documentation/articles/web-...
- egeozcan 12y agoAny chance that it'll support Babel (known previously as 6to5) + JSX (The react extensions to JavaScript)? I love Visual Studio and I also love to write ES6 - I don't want to choose.
- mousetraps 12y agomake a feature request! we're a small team, so we have to prioritize - generally the policy is to build what people want. works well enough :) https://nodejstools.codeplex.com/workitem/list/basic https://nodejstools.codeplex.com/workitem/list/basic
- egeozcan 12y agoI added one for JSX: https://nodejstools.codeplex.com/workitem/1916 https://nodejstools.codeplex.com/workitem/1916
- jbergens 12y agoJSX sounds great. I hope more people vote for it.
- dahart 12y agoOoh, tracepoints, DO WANT! Are they only available in one of the paid versions of Visual Studio? The VS debugger is excellent, its probably the dev tool I miss the most since leaving C++ and going to JS, and tracepoints are the feature I wish for most frequently in a browser debugger. So I was about to naively suggest the VS team could push for tracepoints in IE, but OMG! Tracepoints are in IE11. Where have I been? In prejudice-land. This might mean I have to open my mind and use IE for dev, though the bias runs wide, I still might have to use it in secret for a little while, at least at work. ;)
- mousetraps 12y agoWe've got breakpoints, conditional breakpoints, tracepoints... All the points, really ;-) I don't think you need one of the paid versions, but I'll double check and edit this if I'm wrong.
- bgarbiak 12y agoIs there a simple way to use VS without the Solution files? Templates and Solutions are fine for creating a entirely new project, but if I have to work on someone's else code I'd prefer to have a basic "File Explorer" over Solution Explorer / Team Explorer. My attempts to create a new Solution file for an existing code ended with a new directory (or a couple of them) with a boilerplate code... Am I missing something obvious here? Also, I've noticed that if I open a few files the IDE creates "Virtual Solution", but it's hard to tell which files are there, and which don't. For example: TypeScript files are, but no such luck with SASS. P.S. And a CMD/Terminal in a panel (akin to the Output panel, but with an... well, input) - is that possible?
- rlp 12y agoTry clicking the Show All Files button at the top of the solution explorer. It will show everything by folder, which I think is what you're looking for.
- mousetraps 12y agoHi bgarbiak, You can use the "From Existing Node.js Code" project template to create a project from a folder, but the project file itself is a requirement for visual studio and also allows us to include helpful metadata (whether or not to analyze a directory, etc - most IDEs/text editors include a project file for this very purpose - they just hide it a little better). That said, at some point we'd like to change things up so that the project does feel more similar to the folder/file experience you might expect. This is to change the project file to be more "transparent". https://nodejstools.codeplex.com/workitem/1855 https://nodejstools.codeplex.com/workitem/1855 There's also another issue to directly open a folder without requiring the user to take steps to create the solution/project. https://nodejstools.codeplex.com/workitem/209 https://nodejstools.codeplex.com/workitem/209 Additionally, like rlp mentioned - make sure that "show all files" is turned on so that you can see everything in the folder, not just files you've defined as being a part of your project. Hope that helps - let me know if you have any other questions.
- Scuds 12y agoCongratulations, guys! I've been following this since node tools since Hanselman's post http://www.hanselman.com/blog/IntroducingNodejsToolsForVisualStudio.aspx http://www.hanselman.com/blog/IntroducingNodejsToolsForVisua...
- nickysielicki 12y agoHow many people do you think will actually use this? I just really cannot ever see mass use of azure and visual studio in the web ecosystem. The people writing nodejs code are all using vim and unix, and you're asking them to give up their workflow and change operating systems. I want to be able to poke around in bash. (edited back in) Sure, some people new to web programming might go this route. But the next big web framework certainly will be on unix first. MS is now in this perpetual state of trying to keep up, and I just can't imagine why anyone serious about web programming wouldn't be on *nix.
- untog 12y agoThe people writing nodejs code are all using vim and unix No they aren't, that's just your perception because you are surrounded by those that are. AFAIK Windows Node developers are still a minority, but that doesn't mean they're not a sizable group of people. A lot of code is written in corporate environments in C# and Visual Studio - adding Node to that mix is a sensible bet on Microsoft's part.
- nickysielicki 12y agoYeah I was being hyperbolic, but my point still stands. The LARGE majority of developers have accepted unix as their overlord, and that poses a huge problem to microsoft as they're a second thought. They're forced to try to fit new frameworks into their ecosystem, rather than on unix where developers expect it to run. I see it ultimately as damage control. With the overwhelming majority of developers on unix, you're not going to see microsoft hang out in the server market for very long. I think they'll hang onto the office crowd, but nothing on the backend. This, of course, is just the opinion of a 20 year old unix nerd, who became one because his father is a microsoft fanboy. I rebelled in my teenage years by infuriating my father and installing linux. I still think I raise some valid points.
- WorldWideWayne 12y agoWhat evidence do you have that the majority of developers are on Unix? Just web devs or all devs? I doubt that it's true in either case. IT departments around the world employ programmers to make all sorts of business apps including internet/intranet web apps. Even some very small companies have custom apps to do business and the vast majority of businesses are using Windows.
- matthewowen 12y agoI know this doesn't really mean anything, but it's kinda funny that this is at v1.0, but node.js is at version 0.12.1
- twerquie 12y agoIt does mean something, that Node.js has a backwards version numbering scheme. That's one of the first things the io.js people corrected in their fork (they are strict semver and started at 1.0.0).
- ed_blackburn 12y agoSuperb stuff. Now time for MS to help getting io.js working on Windows. With confidence.
- orand 12y agoWhat are the issues with running on Windows? These tools support io.js https://nodejstools.codeplex.com/wikipage?title=io.js https://nodejstools.codeplex.com/wikipage?title=io.js
- ed_blackburn 12y agoThere have been some intermittent Windows issues: https://github.com/iojs/io.js/issues/1005 https://github.com/iojs/io.js/issues/1005 Not Microsofts problem.
- tdicola 12y agoThis is great news, but aren't there bigger fish to fry with really supporting node.js & npm on Windows? The 255 character path limit bug has been around for a long time and still unresolved/broken on Windows (see https://github.com/joyent/node/issues/6960 https://github.com/joyent/node/issues/6960 and https://github.com/npm/npm/issues/5641 https://github.com/npm/npm/issues/5641). Suggestions to fix it on the Windows side have been closed too: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2156195-fix-260-character-file-name-length-limitation http://visualstudio.uservoice.com/forums/121579-visual-studi... Would be nice for people to stop throwing it around like a hot potato and fix it for good. Although it sounds like an edge case, it's actually really common for some libraries to his this limit and be unusable on Windows.
- mousetraps 12y agoSee comments on this thread re: max_path problems, workarounds, and how we help mitigate it in NTVS: https://news.ycombinator.com/item?id=9265694 https://news.ycombinator.com/item?id=9265694 Otherwise, yeah - we don't like it either... here's the not-closed uservoice request ;-) https://windows.uservoice.com/forums/265757-windows-feature-suggestions/suggestions/6573539-remove-the-long-standing-max-path-limitation https://windows.uservoice.com/forums/265757-windows-feature-... EDIT: Re: fish: Indeed - we have some big fish to fry, but luckily msft is a big company that can fry multiple fish at a time. Personally, I'm excited to help improve the Node tooling story by frying this fish, and passing our learnings and feedback onto the the other teams @ msft so that they can improve their recipes. Ultimately, we strive to have a complementary set of fried fish. And maybe some vegetables too... :)
- Already__Taken 12y agoI thought connect was the official way to complain about MS things?
- mousetraps 12y agoTechnically... - connect is for filing bugs - uservoice is for "ideas and suggestions" How people use it, of course, is a completely different story... And then some teams (like us) have public issue trackers, which are the best approach if available because everything goes directly to the team: https://nodejstools.codeplex.com/workitem/list/basic https://nodejstools.codeplex.com/workitem/list/basic
- cabirum 12y agoI remember a bunch of problems have been discussed earlier [1] concerning node.js on Windows, such as file-system path length limits and broken symlinks and lack of modules actually tested on Windows. That was almost a year ago, so how do the things stand now? [1] https://news.ycombinator.com/item?id=7914566 https://news.ycombinator.com/item?id=7914566
- airtonix 12y agowindows not being a priority won't change, because windows as a deployment target is pretty much a joke. I mean... desktop environment on your application server ... lol? There's so much friction legality and culture wise to getting a windows server to spin up, get developers to use good practices, encourage automation and resusability...
- BinaryIdiot 12y ago> windows not being a priority won't change, because windows as a deployment target is pretty much a joke. I take it you haven't done .Net development? It's incredibly easy though Docker and similar tech wasn't developed for Windows so some of that has lagged behind. > I mean... desktop environment on your application server ... lol? This is a pretty old way of thinking; it's simply another way of managing your application server. This really isn't a big deal anymore.
- babby 12y agoI was really excited about Visual Studio for a chance at Coffeescript intellisense, however I learned after the several gig download it wasn't supported. It seems there is basically no way to get proper autocomplete in any editor for CS, suggesting maybe I should just consider Babel for ES6/7 despite my massive love for CS and giant projects built in it.
- electrum 12y agoHave you tried IntelliJ IDEA?
- babby 12y agoI've tried Webstorm and assumed IntelliJ IDEA had the same pitfalls, which, if I recall correctly, was poor performance and flaky autocompletion. I'll have to download it anyway and try though, if only to see what it looks like to have intellisense!
- c0achmcguirk 12y agoWebstorm has CoffeeScript support too. https://www.jetbrains.com/webstorm/help/coffeescript-support.html https://www.jetbrains.com/webstorm/help/coffeescript-support...
- thearrow 12y agoYou might want to check out sublime with the 'Better Coffeescript' and 'CoffeeComplete Plus' packages. I've been using it for a while and, while it's not perfect, it's the best I've found. https://github.com/aponxi/sublime-better-coffeescript https://github.com/aponxi/sublime-better-coffeescript https://github.com/justinmahar/SublimeCSAutocompletePlus https://github.com/justinmahar/SublimeCSAutocompletePlus
- babby 12y agoI agree, and it's close to usable but not quite. There are a few outstanding breaking issues on the repo that I wish someone who knew how it worked could fix, but the project looks abandoned. I actually heavily modified sublime-better-coffeescript to support highlighting function-calls and I added proper CSJX support. Been meaning to make a pull request; but these Sublime plugins are always so easily abandoned and under maintained that there's no point.
- osw 12y agounless you need to develop in C# or .NET, windows is crippling for programming
- thebouv 12y agoGotta hand it to Microsoft. Behind the times on web dev for so long, now busting out open source left and right, teaming up on Angular with Google, jumping on with nodejs, modernizing their tools, "gently" pushing locked in MS web devs out of the darkness of that Web Forms madness into the light of real web development. I've always been a LAMP stack dev but they have at least caught my attention as of late.
- jeswin 12y ago> Gotta hand it to Microsoft. Behind the times on web dev for so long, now busting out open source left and right, .... Open Source is not just about opening up some source code, it is also about how you act in the larger interests of the community. Just earlier this month, Microsoft sued Kyocera over patents on Android. Microsoft has sued every Android phone maker so far, and have forced some of them to make Windows phones. Their position on Linux infringing unspecified patents has not changed or been clarified. Microsoft is playing the Open Source game because they really have no choice. Open Source has thrived and will thrive without them. Microsoft doesn't deserve our attention until they stop abusing patents.
- pistle 12y agoForest, meet trees. MS is a very large company with divergent groups given KPI's that turn into seemingly contradictory actions. It's the Kabuki theater of patent suing in order to eventually end up at a table finding a way to forge ahead "together." It's something the large IP players have all been doing on the long tail of the IP consolidation wars. IP royalty harvesting is separate enough from the open source efforts that it's picking nits a bit. MS is growing open source because players and groups have beaten the drum to get there and the lumbering giant has shifted. The seeds planted years ago are bearing fruit. You can sing the war song, but Open has won. Glory be! Nobody is looking for everyone to jump into Azure as if it were the latest awesome distro because a bunch of core dev tools, frameworks, and open-friendly advances have happened, but on the current trajectory, we will see the old walls of our discontent torn down by those who built them. You get enough .net devs to come out of their caves and you could be wading through as many "MS + my favorite open source project" posts as not... and the communities, overlapping into harmony, will have bigger upsides for both than downsides. It's becoming an increasingly good time to be a developer. When those you hate become undifferentiated from yourself, do you grow to hate yourself or to love the one you hated?
- itsbits 12y agoIf they free up the developer license, MS will get lots of Apps in for their phone versions as well..They are already supporting javascript for native apps..
- indymike 12y agoHonestly, it's good to see a lot of .Net developers getting to see some sunlight. A lot of really interesting things have happened in JavaScript land over the past few years, and there are a ton of really good programmers who have been in .Netland for far too long.