What do you use to compile and debug when using text editors?

Sorry silly question but I came into coding in the time where on Windows you just use Visual Studio.

But you can’t delve into history without hearing great things about other editors such as Vim.

But I’m a strictly text based editor how are you compiling and debugging languages that actually need compiling.

Sorry I’m new. Just think I’m missing out on some useful knowledge here.

I don’t like not learning more traditional ways just because something new comes out.

1 Like

It depends on the language you are using.
For random “daily” things like configs and just a general “useful tool around the house” I use SublimeText.

For coding/compiling and stuff I use IntelliJ Idea (for Java). Eclipse was also a good thing, but once I ended up in a “IntelliJ snob” project, so ended up using it for a year till today. Can’t say it’s better, just something I’ve used recently (and my hands got used to it).

Vim is a good thing, but I feel it’s good for the people, who actually had no alternative in their days, so moving to something different is a “it’s not Vim”. Personally, when it comes to working from the console, I go for Nano (but I’m a fairly new to Linux).

Depends on the language and the kind of software you’re developing.

make is typical and one of the oldest tools that people use to wrap whatever other language specific things developers choose to use.

For hacky home stuff you’d just type compiler commands into a Makefile in the root of your project.

… or maybe even don’t have a Makefile if you just have everything in one directory.

For that kind of use it doesn’t matter what languages you’re using or if you’re even building code.


For example, to distribute your c code, typically you’d use something like autoconf and automake. Autoconf is a tool you invoke when you add/remove dependencies from your code, it’s what generates the configure script.

People building the code you’re distributing are expected to obtain dependencies you’ve listed in your documentation somehow, then run the ./configure script which will generate the make file from your template with correct paths for wherever dependencies are installed on your system, and the right set of compiler flags.
The person building the binary can call make afterwards.

make is so pervasive it even gets used to wrap other build tools, like scons, buck, bazel, cmake,maven, gradle, ninja, etc…etc… people keep inventing new ones.

Some of the other ones can call and generate configs for other tools and can wrap each other … and they compete in being more versatile and meta, it’s weird.

In general you have to rely on end users/people reading README.txt/.md/.rst and being able to follow your/developer instructions.

You, as a developer, probably want to pick whatever set of tools gets in your way the least, and gets the job done…

… If you have a large developer organization and a big monorepo and insist on reproducible builds, you just use whatever people around you use most of the time, and cry every time you want to stick a copy of third party software into your monorepo.

Nobody’s ever been happy with build tools ever, usually the combination they use will suck but whatever other stuff they don’t use will be worse, from the individuals perspectives.

Personally, I like Bazel for monorepos (/me ducks).

2 Likes

I am so glad I have a copy of “Practical Vim” coming. It may be a powerful editor but I wouldn’t have a clue how to use it properly.

I really need to get a book to brush up on command line/powershell as when you aren’t doing that every day it is confusing when given a bunch of commands to input.

It doesn’t help that most of the stuff online is based around LInux terminal commands.

depends on what im doing.
python i use pycharm
bash/php/http scripts i use gedit

if im being nosey il decompile a dll or exe with ghidra.
not that i have any idea what im doing with it. but i like to dabble :slight_smile:

2 Likes

Most of text editors well suited to writing code give you the ability to execute shell commands. For example gedit which is a common linux equivalent to notepad has the option to enable run shell commands the results of which will show up in a new tab, vim has :!, and emacs has M-x shell. Meanwhile in windows land what visual studio does when you click the green arrow is run a bunch of commands in either powershell or cmd.

For debugging in Windows you don’t have to use Visual Studio. WinDbg is an option too. Furthermore, VS is just providing a GUI to a language specific debugger that is either in the form of a CLI program or a dll that is just a few lines of code short of being a CLI program. You can find out the details of this by just using Process Explorer to look through the files that VS is accessing. With text editor based coding you either have plugin for driving a CLI debugger, use a separate GUI app to drive the CLI debugger, or just use the debugger directly from the command line.

I must admit I’m getting quite frustrated with the whole thing. Because so many talk about how great they are I installed Vim for windows. It is not intuitive at all and while I’m slowly finding my way through it requires a whole bunch of commands that I have to learn which I have no problem with my problem is none of them work!!!

Every command I find online for Vim comes up as not a recognised command on windows.

Even when I run vim in Ubuntu on wsl2 it just doesn’t recognise any commands.

The problem with anything command based is there isn’t a set list of commands online where you know they will work.

If you’re more accustomed to how things work on windows, then yeah vim and emacs are going to seem very strange. The environment that vim and emacs were built to work in is a very different one than the environment for visual studio. They’re just different tools built for different things.

What I’m more getting at is every online command for compiling with vim is written out as Make or something else that also doesn’t work.

If I write :Make in Vim in windows it doesn’t work at all.

In Visual studio it’s just control f5 could not be easier.

What commands are you giving it?

Basic make commands and things like that. I’m obviously doing something wrong but it just comes up as an unrecognised command.

As risk said earlier, make strictly speaking isn’t a compiler its self. make invokes whatever compiler or build tools you’re using on the project using a makefile, so I wonder if maybe you’re trying to use it as if it is a compiler.

Yeah I’m obviously missing a step or process. I’ll keep messing with it.

If you want to use the Linux toolchain on Windows, most of it runs fine on WSL.

vscode is a decent editor, that can run stuff in either vscode or wsl or wsl2 (basically Ubuntu VM).

As long as you can build stuff on the command line, you can put those commands into Makefiles… and you can configure vscode to invoke make in wsl or wsl2 or do whatever, when you e.g. “press F5” or some other shortcut,

Yeah it’s just learning all the commands. Even commands in powershell and wsl2. This is what happens when you can go years never having to use commands in Windows. Get way too rusty.

1 Like

Let’s get started!
1- Write and save the program. To write the source code of your first C program you need to open the Notepad++ text editor.
2- Open Cygwin Terminal.
3- Navigate to your program with Cygwin Terminal.
4- Compile the program to get the executable file.
5- Run the executable.