Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use Emacs. It does need some fine tuning, tree-sitter installation, etc. but after that, I cannot understand colleges using VS. I have seen no feature in VS not available in Emacs.

Some colleges have switched from years VS to Emacs and after a week won’t look back.



> I have seen no feature in VS not available in Emacs.

Guys, please. I am all for FOSS, but such delusions can only be harmful, for they prevent from actually improving stuff.

Did you sir ever use debugger in your life?


Almost every day. I use gdb both for JTAG targets in embedded systems, as in a programs running in my host.

Emacs has a front end for gdb. Some colleges use other front ends.

What I’m preventing to improve, in your opinion?


Can you share what the experience is like debugging with gdb directly?

I'm new enough that my first debugger experience was Visual Studio, and I currently use IntelliJ IDEs which provide a similar experience. That experience consisting of: setting breakpoints in the gutter of the text editor, visually stepping through my source files line by line when a breakpoint is hit, with a special-purpose pane in the IDE visible, showing the call stack and the state of all local variables (and able to poke at that state any point higher up in the stack by clicking around the debug pane), able to execute small snippets of code manually to make evaluations/calculations based on the current program state.

I'm not so naive to believe that effective debugging tools didn't exist before GUIs became commonplace, but I have a hard time seeing how anything TUI-based can be anywhere near as information-dense and let you poke around at the running program like I do with my GUI-based IDEs.

(Pasting this comment under a few others because I genuinely want to hear how this works in the real world!)


Setting a breakpoint ist just „b place“ place can be for example file:line, or the name of a function, etc.

Then „n“ for next line, „s“ for step-in, „fin“ to go to the end of the function

Dprintf for adding dynamically printfs for watching variables

List will show you 10 (default) lines of code around the cursor, bt will show you a backtrace…

I think that covers the basics. As you can see, ist just a keypress mostly for doing anything.

With Emacs you can click on the fringe for setting/deleting breakpoinst.

The bread and butter is really easy, and other than seeing the cursor in the code, there is no advantage. In Emacs you DO see the cursor moving…


Some emacs-fans really like emacs and will invent any justification for its shortcomings. You are 100% right it has a subpar debugging experience. There were better debuggers 20 years ago than emacs has now.

Stallman himself wrote it so it lies at the intersection of that camp and the lisp cultists (though Ig they are mostly extinct post-LLM), but they used to have a really strong belief that lisp was the path to AI because of it's homoiconicity.

What should be said in it's favor is that due to its architecture it is crazy extensible and hackable. And the fact that the line between configuration and code is very blurry really encourages you to dive into that.

The choice of lisp also helps ensure user freedom as it's a quite simple language - ensuring that compilers and interpreters are a commodity. You don't like one, pick another. Contrast that with say Rust where if you don't like the official Rust you are shit out of luck. It's also a rolling release deal so you can't even easily stay on an old version.


To improve GDB and its frontends so they match VC++ debugger experience.


Maybe is personal preference? I like better gdb directly to VC. I’ve tried to debug with VC, but I felt slow working with it. After several tries, I gave up.


What is so superior about Visual Studios debugging experience that you're sure it can't be replicated anywhere else? I've never used it.


The UI is great but could be matched by other tools, what's superior are advanced features like the remote debugger.


Most of my colleagues never use a debugger even though they use vscode. I (the weird emacs user) actually had to show them how to use one, but they still don't.


Are they actually programmers? Or just people who pretend to know how to code? How can you be a professional programmer and not use a debugger? Also not sure what VS Code has to do with it, it's not Visual Studio proper.


I know plenty of professional programmers (job title states so) that not even they do not use a debugger, many don’t even know how to install/use one or even the very concept of “execute step by step”. Plenty of python users don’t know what pdb is (as matter of fact, have never met one that does know it!). Also plenty of embedded developers writing C or C++ or Java

They go all the time adding hundreds of print(f) of log_* function calls. Often they don’t care to remove them after the fact, as I ask them to, often comes “can/will be useful to detect future bugs”

I’m in the automotive industry, where is known to be a disaster in topic SW. but I think it is also common in other industries. I have seen it in telco already.

While I agree that knowing a debugger is important, and as a leader won’t hire somebody who do not use it, is a fact that many people don’t use it, and are doing ok.

Last but not least, it must be said sometimes you have to go to prints: in fact yesterday I had to, as I was debugging a library with sockets, which would timeout pretty quickly. I used dprintf in gdb, but the advantage to simple prints was not huge.


>>Last but not least, it must be said sometimes you have to go to prints

Well yes, obviously - it's an indespensible tool in any arsenal, I just cannot fathom(as a C++ low level engineer) how someone can be a professional programmer where they are paid for their job and they don't know to use a debugger even to just do a basic pause and step through flow. But then again I don't work with any python programmers, so maybe that's why.


They managed to grow a career out of a minimum set of skills, printf was enough I guess. Also they leverage stupid IT shops where squeaky wheel gets the grease.. being efficient at debugging would almost prove harmful in their world.


printf will get you far.

In C etc. printf calls also make all intermediate variables observable in the debugger. You can debug programs where you can't pause it. Etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: