News for hackers. Stuff that matters.
Re:Visual Studio Code is randomly erasing included header fi... by lovingCranberry on Saturday March 19, 2022 @06:52PM (#30738291)
People use VSC for c++? I tried to use it once, but nothing really worked out of the box and the experience was so much worse than any other c++ IDE. Same with .Net in VSC.

Always felt like Microsoft wants to push me towards their "main" Visual Studio for c++ and .Net by keeping the VSC experience for these languages bad.

Re:Visual Studio Code is randomly erasing included header fi... by ncake on Saturday March 19, 2022 @07:37PM (#30738566)
I've had the opposite experience, and everything just works once you install the suggested extensions.

For C++ specifically you just need to create a .vscode/c_cpp_properties.json file to tell the intellisense where to find include folders, which defines to assume, and such.

Re:Visual Studio Code is randomly erasing included header fi... by CalChris on Saturday March 19, 2022 @07:05PM (#30738368)
I use VSC for C++. I use the clangd and VSCode NeoVim extensions. I don't use it as an IDE but as a code editor, it's the best I've had.

Visual Studio and Visual Studio Code have nothing but two words in common. Dunno why VSC is called that. But on OSX, I just type code on the command line.

Re:Visual Studio Code is randomly erasing included header fi... by seabrookmx on Saturday March 19, 2022 @07:08PM (#30738386)
I daily drive the C# extension in VSCode and it's great. The debug inspector is slower than I recall in "real" VS but I'm also using it on Linux via WSL, so it might be because of omnisharp.
Re:Visual Studio Code is randomly erasing included header fi... by chrismcb on Saturday March 19, 2022 @06:59PM (#30738337)
Visual studio code works just fine for c++. Out of the box. You may need to install the liner but that's it. I don't think it is as good as visual studio, but it isn't that bad that they are trying to push you to another ide.
Re:Visual Studio Code is randomly erasing included header fi... by adhesive_wombat on Sunday March 20, 2022 @04:19AM (#30741036)
VS Code is a competent enough almost-IDE at least for a CMake project.

The main issue I have so far is remote debugging in gdb appears not to work very well (you can step but you can't use normal gdb commands on the console like you can locally).

Also the autocompletion seems to work only sometimes but that's likely my fault since I haven't actually configured that.

So far, it's working better for me than Sublime did, which was very laggy at times. Both are memory hogs, though.

Re:Visual Studio Code is randomly erasing included header fi... by emerged on Sunday March 20, 2022 @08:17AM (#30742034)
RemoteSSH extension is a far easier approach to debugging C++ remotely in VScode.
Re:Visual Studio Code is randomly erasing included header fi... by adhesive_wombat on Sunday March 20, 2022 @01:45PM (#30744796)
Interesting! Can you then debug remotely but still use local symbols and sources? The remote is a pretty weedy embedded platform, so you don't want to compile there, and I don't think there is even enough disk space for a complete checkout of the source. So you want to just run gdbserver there and have all the rest of the debugging junk running on a "real" computer.
Re:Visual Studio Code is randomly erasing included header fi... by emerged on Monday March 21, 2022 @11:40AM (#30755324)
It behaves as if you’re local to the machine. Changed my life when I first found it.
Re:Visual Studio Code is randomly erasing included header fi... by IshKebab on Sunday March 20, 2022 @02:48PM (#30745398)
> almost-IDE

It is an IDE!

Re:Visual Studio Code is randomly erasing included header fi... by zen_1 on Sunday March 20, 2022 @10:27AM (#30742870)
For what it's worth, my partner and I have been using VSC for our C++ kernel/project in our course, and we've found it to work really well after some setup (mainly CMake and cross-compiler setup).

Sure, you don't get the same level of refactoring ability that you would from say, intellij + kotlin, but compiler warning/error integration and going to declaration/definition both work, which is enough for our purposes.

Re:Visual Studio Code is randomly erasing included header fi... by smackeyacky on Saturday March 19, 2022 @07:08PM (#30738396)
I prefer coding .NET in VSCode, although I really only use the debugger and the code completion. Visual Studio hides too much of the build process for me.

Never used it for C++ though.

Re:Visual Studio Code is randomly erasing included header fi... by chrismsimpson on Saturday March 19, 2022 @06:54PM (#30738308)
Latest .NET/C# and LLVM/Clang work a charm for me.
Re:Visual Studio Code is randomly erasing included header fi... by CornCobs on Saturday March 19, 2022 @09:55PM (#30739305)
I've been forced to use visual studio for c++ with cmake integration and I must say no matter how lacking VSC is, I don't think visual studio does much better.

Refactoring capabilities are woefully inadequate or just don't work, intellisense is often plain wrong, it doesn't detect when a rebuild or when cmake cache needs to be regenerated often enough, the list goes on and on

Re:Visual Studio Code is randomly erasing included header fi... by mdaniel on Saturday March 19, 2022 @11:08PM (#30739718)
If you don't like VS, you may enjoy CLion, as it uses CMake as its primary build system. I was flabbergasted at how poor the Refactor menu is in VS, and I now understand why Reshaper makes so much money

https://www.jetbrains.com/clion/

If you're an adventurous person, you can also use their EAP builds for free until the EAP cycle ends: https://www.jetbrains.com/clion/nextversion/

They always say "EAPs are pre-release and may have sharp edges" but TBH I've been choosing the EAPs because they often come with the most features. Only 1 out of every 20 releases has some kind of "wtf" experience

Re:Visual Studio Code is randomly erasing included header fi... by klysm on Sunday March 20, 2022 @02:03AM (#30740524)
I had the exact same thought about C# in VSC being intentionally bad this week. There’s so many conflicts of interest within Microsoft’s tech ecosystem.
Re:Visual Studio Code is randomly erasing included header fi... by mbrodersen on Sunday March 20, 2022 @08:57PM (#30748747)
Yep. It works great.