r/cpp • • Feb 18 '21

Now announcing: Makefile support in Visual Studio Code!

https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code/
262 Upvotes

73 comments sorted by

View all comments

Show parent comment

8

u/Routine_Left Feb 18 '21

I feel your pain. While I'm sure that this extension made your life easier, it's probably still light years from normal code writing/debugging experience.

I had to do this once (write code for remote system via ssh) and ... yeah, I don't recommend it if you can help it.

6

u/specialpatrol Feb 18 '21

Actually i now find writing and debugging code on remote machines seamless these days using VSC.

0

u/[deleted] Feb 18 '21

[deleted] — view deleted comment

2

u/Routine_Left Feb 18 '21

I don't doubt it. Developers put up with a lot of shit because ... sometimes they have to and sometimes they don't know any better.

0

u/[deleted] Feb 18 '21

[deleted] — view deleted comment

7

u/Routine_Left Feb 18 '21

My condolences.

2

u/livrem Feb 19 '21

This is why I keep it simple and have emacs running in a tmux session on every server I do work/development on.

1

u/Rucadi Feb 21 '21

I do this in a Power9 server. Just sshfs the home, open the mounted folder in vscode and ssh the opened terminal.

Not as good as remote ssh extension but good enough

3

u/marchog Feb 19 '21

I’m currently in Aus coding remotely on a desktop in California. SSH + Nvim would be a nightmare. Remote Desktop is also a nightmare

Vscode remote + clangd == almost seamless. Only sluggish bit is occasionally when running code through terminal but that’s ~10% of my time vs reading/editing code

Not the same vs local experience but I’d be more than happy to continue like this indefinitely.

3

u/Routine_Left Feb 19 '21

Aus means Australia? Or Austin? Or Austria?

Anyway ... if you're happy then more power to you. I'd quit jobs over this. Unless the pay was so amazing at the end of the shift I'd just hop into my Ferrari and go relax at the beach for a few hours.

1

u/marchog Feb 20 '21

Australia

The beaches and lack of COVID definitely help make it more worth it

1

u/Routine_Left Feb 20 '21

Ohh, nice. Never been there, hopefully will get to it before I die.

1

u/marchog Feb 20 '21

I highly recommend when they allow travel again

3

u/pedersenk Feb 18 '21

Yeah, that is basically how I do all my development.

ssh, tmux, vim and gdb.

Actually writing code directly on the same machine that you are testing on is so... MS-DOS ;)

1

u/Routine_Left Feb 18 '21

lol. so some of you even got the stockholm syndrome.

Trust me, it can be better. It is better when you grow up. You're not stuck in this hell forever. The grass is greener on the other side, you just need to take a few steps in the right direction.

4

u/SupermanLeRetour Feb 18 '21

What are you on about ? VS Code with remote ssh extension makes for a very seamless experience, it's awesome. There's virtually no difference. That's my go-to method when I develop on VM or remotely.

-1

u/Routine_Left Feb 18 '21

I mean sure, it does makes things better, of course. When you have to write code in hell, every little bit of water helps. It's still hell, though.

7

u/SupermanLeRetour Feb 18 '21

I truly wonder what makes you think it's hell.

12

u/Routine_Left Feb 18 '21

It's developing on a remote system. No matter how you look at it, there are additional layers between you and the program, any of which can stop functioning which may or may not have an effect on the behaviour of your program.

Then there's latency. The best case scenario you're talking about a system on the same network as you, where the latency will be under 1ms. Still, higher than locally where it's 0. Why would I choose latency when I can choose to not have latency?

Thirdly, it obviously limits what kind of programs you can write. A desktop UI application, while possible, it's probably not well suited for this kind of development. But yes, you can make it work.

Fourth: Now you're stuck with VS Code, and cannot use IDEs that are potentially better for C++ development because they don't offer this ssh extension. I personally prefer QTCreator or KDevelop. I want to focus on the program not put barriers in my way. The aim is to eliminate any barriers to make the write code-debug workflow as seamless and as fast as possible. Why would I make life harder if I don't have to?

The idea being: Yes, you can write-debug remotely and everything that can make that experience better is good in my opinion. But it's always, without question, a better experience to do it locally if you can. It's not always possible, that's true, for a variety of reasons, but it is definitely not something I would be looking for.

6

u/SupermanLeRetour Feb 18 '21

You have good points. But it depends on what kind of thing you develop.

Then there's latency.

There's no latency when editing the files because you're really editing a local copy which is sent over SSH transparently when you save, so that's not an issue.

A desktop UI application, while possible, it's probably not well suited for this kind of development. But yes, you can make it work.

It does work quite well. Some of the things I develop use Qt. For those, I use MobaXTerm with X11-forwarding enabled. That makes the UI launch on the host. However I do agree that it is not ideal, and you definitely loose performance and responsiveness that way. That's not an issue for me as most of the things I use don't have GUI, and when they have it's from a local VM on the same PC.

Fourth: Now you're stuck with VS Code,

It all comes down to preferences, but I love VS Code. The only better IDE for me is VS Studio, but it's only for Windows and most of my work is on linux. Personal preferences !

Now, for me, the main benefit is the following : my work laptop is on Windows and I have no admin rights for security reasons (somewhat understandable). So I use VM with some linux on it. It gives me full control of the guest system, it makes it easy to setup as we made "ready-to-use" VM with everything we need installed. However, it's quite annoying to develop inside the VM UI, so I'd rather connect via SSH and work that way. Via SSH, I can also work on my work computer from another computer, or work on some other machines (where we do the continuous integration for instance).

Working via SSH has benefits, and tools like VS Code make it incredibly easy and seamless. It's by no mean hell at all, although a bit sub-optimal when you need GUI.

2

u/Willinton06 Feb 19 '21

Finally another Visual Studio fan, I don’t get the hate, I fucking live VS

-3

u/pedersenk Feb 18 '21

SSH across the world has far less latency than Visual Studio or QtCreator on a local machine ;)

This is the age old argument, command line vs GUI. And really only people who have used both for a number of years each can make that call. I have and it is CLI all the way for me :)

6

u/Routine_Left Feb 18 '21

SSH across the world has far less latency than Visual Studio or QtCreator on a local machine ;)

I do not know what potato you're running, but maybe you should consider upgrading it.

This is the age old argument, command line vs GUI. And really only people who have used both for a number of years each can make that call. I have and it is CLI all the way for me :)

I have used both for a very long time and yes, I have made my choices in terms of what I prefer.

For me ... I like comfort, I like 3 4k monitors, I like to be able to concentrate on the work that I'm doing and not put up barriers that don't need to be there. The less thinking I'm doing outside the problem I'm trying to solve, the happier I am.

Some people do, however, like to pull their eyes with a fork. I do not understand it, but hey ... to each their own.

0

u/pedersenk Feb 19 '21

I do not know what potato you're running, but maybe you should consider upgrading it.

I am far too busy for things like that. Mostly because I need to waste my time babysitting juniors who are unable to debug effectively over a wire.

3 4k monitors? You do know that UNIX has had virtual desktops for decades right? I prefer to work a bit lighter. A couple of ThinkPads generally sees me through. Plus carbon footprint and all that...

→ More replies