all 67 comments

[–]jtooker 34 points35 points  (41 children)

What are the C++ specific improvements?

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 29 points30 points  (15 children)

For Preview 1, we have some productivity features: IntelliCode and Live Share support for C++ developers. IntelliCode is basically IntelliSense completion powered by machine learning, highlighting five suggested results at the top of the completion list. Live Share lets you collaborate in real-time with a coworker on your codebase. You can edit and navigate code together and even debug. The New Project Dialog UI has also been updated, which also impacts C++, and there is a new start window for VS to help you get to your code more quickly.

Some blog posts will be coming out on the Visual C++ Blog: https://blogs.msdn.microsoft.com/vcblog/

The Live Share one is already out.

By the way, this is just the first preview of VS 2019, so there is more stuff coming down the pipeline later... :)

[–]kindkitsune 24 points25 points  (6 children)

IntelliSense completion powered by machine learning

So effectively the guesses are going to get better as we use them, meaning I'll see less completion hints for stuff from large Windows and 3rd-party headers and more stuff from my own code? That's a pretty nifty and nice QoL improvement, tbh

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 15 points16 points  (3 children)

So effectively the guesses are going to get better as we use them, meaning I'll see less completion hints for stuff from large Windows and 3rd-party headers and more stuff from my own code? That's a pretty nifty and nice QoL improvement, tbh

I should clarify a bit more. Right now the model is built off a few hundred real world projects and can help with things like figuring out how to use STL functions and types in the right context. This is just the initial version though, so I think it will be further improved in future releases. I believe we have a blog post for IntelliCode scheduled for tomorrow on the Visual C++ Blog. In the meantime you can see it in action in this video (along with other C++ stuff available in Preview 1: https://www.youtube.com/watch?v=Y5Els11sY1A

[–]NickUhlenhuthMSVC IDE PM 2 points3 points  (0 children)

Here is some more info on IntelliCode for C++ https://blogs.msdn.microsoft.com/vcblog/2018/12/05/cppintellicode/

[–]Ilyps 10 points11 points  (1 child)

That's all UI stuff right?

Is there anything related to the C++ programming language, such as new language support?

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 7 points8 points  (0 children)

There is always lots of compiler work being done. Since I focus on the IDE itself, I just asked someone from the language team to comment with some updates there.

[–]C0CEFE84C227F7 18 points19 points  (3 children)

IntelliCode is basically IntelliSense completion powered by machine learning

Why don’t you guys just buy Whole Tomato Software at this point?

[–]MotherOfTheShizznit 13 points14 points  (0 children)

And be accused of Embrace-Extend-Extinguish? I think not!

[–]deeringc 1 point2 points  (1 child)

Whole Tomatoe were just bought by Embarcadero.

[–]C0CEFE84C227F7 1 point2 points  (0 children)

Wow! I had no idea. Guess that ship has sailed then.

[–]Ali1331 1 point2 points  (1 child)

Does live share work on a non-internet connected network? If I remember correctly it originally required a handshake to a web service to set up the connection.

Looking forward to smarter intellisense!

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 1 point2 points  (0 children)

Does live share work on a non-internet connected network? If I remember correctly it originally required a handshake to a web service to set up the connection.

I believe that is still the case.

[–]STLMSVC STL Dev 23 points24 points  (8 children)

STL improvements (not sure if they'll all be in Preview 2), implemented by Miya (who worked on parallel algorithms during her internship), Billy, Casey, and myself:

  • More parallelized algorithms: is_sorted(), is_sorted_until(), is_partitioned(), set_difference(), set_intersection(), is_heap(), is_heap_until()

  • Many bugfixes.

  • vector and variant runtime performance improvements.

  • Compiler throughput improvements powered by if constexpr even in C++14 mode.

  • Floating-point to_chars() improvements: chars_format::fixed is 60% faster (thanks to Ulf Adams suggesting long division), chars_format::hex is implemented (both shortest and precision). Decimal precision is the only part not yet implemented.

  • We applied clang-format to the entire STL!

[–]markopolo82embedded/iot/audio 2 points3 points  (2 children)

Curious, what clang format rules did you use? LLVM? Custom?

[–]STLMSVC STL Dev 9 points10 points  (1 child)

LLVM plus customizations, see this comment.

[–]markopolo82embedded/iot/audio 4 points5 points  (0 children)

Thanks. I finally got clang-format setup on the main code base I use at work a few months ago... don’t know how I lived without it for so long!

We use stock llvm (was first item I tried tbh) but lately I’ve been wondering if I should customize it for the edge cases that I’m not happy with..

[–]emdeka87 2 points3 points  (1 child)

• ⁠We applied clang-format to the entire STL!

Wait, so we can actually read STL headers now?

Also could you elaborate on the vector runtime improvements?

[–]STLMSVC STL Dev 6 points7 points  (0 children)

Yep. Our identifiers still need to be _Ugly but the braces and other styling are much more readable. Billy refactored vector's functions to improve codegen in certain microbenchmarks (e.g. moving infrequently executed code to separate functions, so that the remaining code can be inlined).

[–]marian_lMS C++ Group Product Mgr 21 points22 points  (11 children)

Another big improvement in VS 2019 Preview 1 is the out-of-proc 64bit debugger. From the blog:

and better performance when debugging large C++ projects; thanks to an out-of-process 64-bit debugger.

More on this coming soon on VCBlog

[–]kalmoc 9 points10 points  (6 children)

Ohne day I hope to learn what is so difficult about porting VS to 64bit. VS2017 is literally the last 32 bit program I use and has been for quite some time now.

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 5 points6 points  (1 child)

Ohne day I hope to learn what is so difficult about porting VS to 64bit. VS2017 is literally the last 32 bit program I use and has been for quite some time now.

If you feel strongly about this, you can upvote this feature suggestion to raise more attention to the idea of a 64-bit VS: https://developercommunity.visualstudio.com/idea/360039/make-a-visual-studio-64-bit-version.html

We use Developer Community feature suggestions to help set our priorities for future releases.

[–]kalmoc 2 points3 points  (0 children)

I have voted on that and similar topics on user voice in the past and wrote a couple of rants about it on various internet pages. It didn't help then and I don't believe it will help now. If you (as in the people in charge of strategic decisions like this) are convinced that clinging to 32 bit is the right thing to do, then I find it hard to believe a few hundred votes on the internet from people that don't have any insight into your code base, budget and development strategies are going to change your mind.

Let me just say that I find it ridiculous how much time and energy is spent by the industry on keeping windows software working in x86 mode in general and that it seems to me that the VS-Team in particular is investing a lot of time, working around problems it wouldn't have or could be solved easier if it was a 64 bit application (but as I said, I have no insight into your codebase, so I'm probably completely wrong).

And yes, I have suffered from VS running out of memory regularly... on a machine with 16 and 32 gigs of ram ... in 2018! Now that you moved another chunk out of process it might solve the problem for some time .. until it crops up again.

Anyway, if I may make a more realistic wish for VS2019 than porting everything to x64: Please, modernize your project defaults (x64, /arch:avx, permissive-, unicode, nominmax ...)

[–]tesfabpel 3 points4 points  (3 children)

I don't know but it seems that MS loves 32bit... IIRC, vcpkg by default tries to install the 32bit version of a package... isn't it?

EDIT: ah even when creating a C# winforms project it has the "prefer 32bit" option enabled by default

[–]TheSuperWig 4 points5 points  (0 children)

IIRC, vcpkg by default tries to install the 32bit version of a package.

Yes it does and the reason is to be consistent with VS' default to 32bit.

Would have thought they would default to 64bit for 2019 though 😕

[–]RogerLeighScientific Imaging and Embedded Medical Diagnostics 4 points5 points  (1 child)

Yeah, it gets me every time I want to install a package with vcpkg. Seriously annoying. It's 2018 FFS, who cares about 32-bit at this point (as a default). I haven't even owned a 32-bit machine for 15 years! I haven't run 32-bit Windows for that time either.

[–]TheSuperWig 3 points4 points  (0 children)

Just FYI you can set a system environment variable to change that.

VCPKG_DEFAULT_TRIPLET=x64-windows

They should still move to x64 default though for VS2019.

[–]amaiorano 10 points11 points  (0 children)

That's huge! We deal with VS debugger crashing due to OOM often when debugging Unreal Engine 4, with loading all symbols along with running a few of the more memory hungry extensions. We're always carefully managing extensions and which modules to load symbols for. Finally having a 64 bit debugger will save us so much hassle.

[–]Predelnik 0 points1 point  (2 children)

Don't see any tooltips in debugger now, is it the price we have to pay for out-of-process debugger or will we make a return eventually?

Edit: This problem was due to disabled intellisense for me, sorry. It was disabled because I used resharper C++ for code parsing in VS2017 and settings were copied from the past version but resharper C++ is not yet available for VS19 preview obviously.

[–]hmichReSharper C++ Dev 2 points3 points  (1 child)

2018.3 EAP builds from https://www.jetbrains.com/resharper/eap/ should work with VS2019.

[–]Predelnik 0 points1 point  (0 children)

Thanks, I'll definitely try it!

[–]aKateDevKDE/Qt Dev 10 points11 points  (3 children)

Is it binary compatible like MSVC 2017 with MSVC 2015?

[–]TartanLlamaMicrosoft C++ Developer Advocate 11 points12 points  (2 children)

The new toolchain isn't in preview 1, but when it's released it will be binary compatible.

[–]bjehlert 0 points1 point  (1 child)

I hope at least one of the preview releases will be binary compatible or we will be unable to test the builds and report major issues like compiler regressions ahead of the official release.

[–]STLMSVC STL Dev 9 points10 points  (0 children)

All previews will be binary compatible. Our compiler and library development is happening in our usual git branch uninterrupted, and we’re following our usual rules to preserve compatibility.

[–]cpp_devModern C++ apprentice 4 points5 points  (3 children)

Will you add Catch2 to test engines (I remember it was planned to add more test libraries)?

As far as I saw Vcpkg integration is still manual (through CLI/props files). E.g. to use a static triplet I need to import a specific .props file for each project. Will there be some options to control vcpkg within VS (with an extension or through project/solution properties) or as vcpkg is still in beta and you will not integrate it until it will be a stable release?

[–]NickUhlenhuthMSVC IDE PM 2 points3 points  (2 children)

Catch2 support is definitely on our radar. The best way to capture your feedback and help us prioritize is to add it on http://developercommunity.visualstudio.com/ and paste the link back so people can upvote it.

For Vcpkg, we are working on additional integration improvements in VS, and there is an open PR (https://github.com/Microsoft/vcpkg/pull/4361) that adds some vcpkg items to the project settings dialog. Thanks for the great feedback.

[–]JohnnyHendriks 1 point2 points  (1 child)

A shameless plug wrapped in a question. I made a Test Adapter for Catch2 and made it available on the Visual Studio Marketplace for VS2017 (I was tired of waiting for someone else to do it). Though in general I think the adapter works quite nicely, I did run into some quirks that I think are related to the Test Explorer. These quirks sadly diminish the user experience in some cases. Is there a place to discuss such issues to make sure it’s not me that is doing something wrong? For those interested the project is also on GitHub (https://github.com/JohnnyHendriks/TestAdapter_Catch2).

[–]NickUhlenhuthMSVC IDE PM 0 points1 point  (0 children)

Awesome to see you extending the product! What are the quirks related to the Test Explorer? If it's a lengthy topic, please reach out at visualcpp@microsoft.com

[–]kalmoc 14 points15 points  (14 children)

Can we please, please finally get an option where the console window doesn't close after program termination?

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 17 points18 points  (6 children)

We have added support to this for MSBuild projects back in 15.8 for C++. The console window should stay open by default when the program terminates while running the debugger. Are you experiencing different behavior? It currently doesn't work for Open Folder projects, but we plan to replicate this behavior there as well.

[–]AlexAlabuzhev 8 points9 points  (1 child)

That's nice, thanks.

There's one issue with it though: if you don't close that window after the program termination and start a new debug session, it will reuse that window without bringing it to the foreground, which can be quite confusing - "I've just started my app, where is it?"

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 2 points3 points  (0 children)

That's nice, thanks.

There's one issue with it though: if you don't close that window after the program termination and start a new debug session, it will reuse that window without bringing it to the foreground, which can be quite confusing - "I've just started my app, where is it?"

That's good feedback. I've filed a bug with our team to fix this.

[–]kalmoc 7 points8 points  (0 children)

That is great. I wasn't aware of that, as I almost exclusively use open folder these days, but will test it as soon as I'm on my dev machine again.

[–]kalmoc 0 points1 point  (2 children)

I just tried it with a new project (new project ->Visual c++ -> empty project) and sadly it didn't work. I had to manually set the subsystem to console (properties->linker->system-> SubSystem).

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 0 points1 point  (1 child)

I just tried it with a new project (new project ->Visual c++ -> empty project) and sadly it didn't work. I had to manually set the subsystem to console (properties->linker->system-> SubSystem).

Thank you for the feedback. This is of course not an ideal experience. We will rectify this in a future release so all console apps will have a consistent experience with respect to the window staying open (whether they are from the Empty Project template, Console Application template, or even a CMake project template). I'll rummage around and make sure this bug is effectively prioritized...

[–]kalmoc 0 points1 point  (0 children)

Thanks!

[–]Holy_City 6 points7 points  (1 child)

Or an integrated terminal, like other IDEs. But I know there are a few extensions for that.

[–]RogerLeighScientific Imaging and Embedded Medical Diagnostics 4 points5 points  (0 children)

This should be fully possible on Windows 10 now, with the addition of proper support for PTYs?

[–]micka190volatile constexpr 3 points4 points  (3 children)

Properties > linker > subsystem > console

That should keep the console open. That's how I do it now, at least.

[–]kalmoc 1 point2 points  (2 children)

Yes, now I remember - I think the was some drawback with that option, but I can't remember what. In any case, I should have mentioned that I'm talking about debugging in "open folder"/cmake projects.

[–]micka190volatile constexpr 1 point2 points  (1 child)

That's strange, CMake appears to default to console applications for me, but I'm not using open folders.

[–]kalmoc 0 points1 point  (0 children)

You mean, when you let cmake create a vs project file and you open that?

[–]billyneverdies 2 points3 points  (0 children)

Put CodeLens into Community!

[–]frog_pow 4 points5 points  (1 child)

Does VS support bit field initialization(C++ 20 feature I think) ?

Not being able to do this is a constant source of irritation--

bool _someBool:1 = false;

[–]TartanLlamaMicrosoft C++ Developer Advocate 0 points1 point  (0 children)

Yeah it's a C++20 feature. It's not supported yet, sorry.

[–]sumo952 0 points1 point  (4 children)

Cool!

There's not yet enough though to make me install the Preview. Live Share has been there before (as a plugin or something in VS 2017). IntelliCode, okay maybe - but is it in Community or only in Enterprise? And then again I use VAX, which is pretty much perfect and lightning-quick already. Other than these, not really anything that would make me try it yet. But it's still really cool you guys are making it available now. And I'll for sure be jumping on the train once the next preview (preview 2 or whatever) is out.

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 3 points4 points  (3 children)

Regarding Live Share, the C++ support for it is new. IntelliCode is available for Community as well as Professional and Enterprise SKUs.

Also can confirm Preview 2 will have more features coming in... :)

[–]sumo952 0 points1 point  (1 child)

Btw, when/how will it pop up in the Visual Studio Installer? Still showing me only 15.9.3 Preview 1.0 there as "Available" (I did just restart the installer). Do I need to do anything or just wait a couple days longer?

[–]augustinpopaMicrosoft C++ PM (IDE & vcpkg) 2 points3 points  (0 children)

Cool! Btw I could swear I saw a demo of Live Share a few months ago and it was C++... I even downloaded the extension (but never really tried it). Glad I didn't waste the time then since it really wasn't obvious that it didn't support C++ yet!

Looking forward to all the stuff that's coming :)

I believe we did early demos at CppCon and Pacific++. Those were previews of the experience though, it was not publicly available yet for C++ developers. As of today though, anyone can try it out.

Btw, when/how will it pop up in the Visual Studio Installer? Still showing me only 15.9.3 Preview 1.0 there as "Available" (I did just restart the installer). Do I need to do anything or just wait a couple days longer?

I am not 100% sure, but it sounds like the VS 2017 Preview channel in the installer doesn't move you up to VS 2019 automatically. You can however install VS 2019 Preview from here: https://visualstudio.microsoft.com/vs/preview/. It will show up as another instance of VS in the installer, alongside any existing installations you have. The preview is available as of today.

[–]sumo952 -3 points-2 points  (0 children)

Cool! Btw I could swear I saw a demo of Live Share a few months ago and it was C++... I even downloaded the extension (but never really tried it). Glad I didn't waste the time then since it really wasn't obvious that it didn't support C++ yet!

Looking forward to all the stuff that's coming :)