Hacker News new | past | comments | ask | show | jobs | submit | alcover's comments login

The page wants to load miles and miles of Javascript. It can go to hell.

  > gdb(..) smashing tui with app output
this got me losing my mind. How/why propose this tempting TUI mode when the result looks like a broken arcade game ??

How do you people comfortably debug C in Linux ? I know VSCode looks nice but by principle I can't accept to use such a beast to basically edit code..


> How do you people comfortably debug C in Linux?

same way I debug everything, everywhere: logging.


That not very environmentally friendly.

> How do you people comfortably debug C in Linux ?

I just got comfortable using gdb/lldb from the terminal. Once you get used to it, it's fine (albeit not pretty).


The advantage for text based interfaces is that they work over ssh/tmate over trans atlantic connections whereas the GUI tools would suffer greatly. It just works everywhere and if you learn it, it will be just as good as a gui debugger. Potentially even more ergonomic without hunting for options with a mouse.

I‘m using cgdb, which is a minimal ncurses wrapper around gdb. It‘s a lot better than the TUI of gdb.

Termdebug works great with gdb, and I get my usual editor features as well as the full functionality of gdb. Seems fine to me.

Before I switched from emacs I had an equivalently good setup with dap-mode.


Use Emacs to drive gdb (through the GUD mode) gives a much more ergonomic interface. It highlights the line of code being traced in the code window.

as I said - this easy to fix once and for ever

Also not all apps write to stdout/stderr by default.

> How do you people comfortably debug C in Linux ?

It depends on what comfortable is for you. Most of my pc experience is terminal and browser and this is comfortable for me. I just use gdb for debugging. Sometimes trying lldb


emacs. Worked great for decades and works great today. Learn it.

That is excellent and the result can be very pleasing as this render in the article : https://ameye.dev/notes/rendering-outlines/edge-detection/co...

It looks like a frame from dutch comic book Franka !


It’s a recreation from a panel of Tintin The Black Island!


ISWYDH


> we destroy everything

With human birth rate declining maybe Nature will have a chance to heal ?


DeepMasking


Crumb has been living in a small village in the south of France since the 90's.

In the "Crumb" doc he says something along "They're all wearing baseball hats. I'm getting out of here.", speaking about the US.

He also laments having taken too much LSD.



  "And in her ears the little Seashells, the thimble radios tamped tight, and an electronic ocean of sound, of music and talk and music and talk coming in, coming in on the shore of her unsleeping mind."


  > Unique Debugging
That caught my eye. How do you people debug C (on Linux) ? I'm tired of switching constantly between Sublime and GDB. I know there's a GDB plugin for Sublime but it's a pain to configure.

I need to edit my code AND set breaks in the same GUI window. There is DDD but it's old and odd looking. Tried Kate also but for some reason didn't like it.


> I know there's a GDB plugin for Sublime but it's a pain to configure.

Which did you try? The one using DAP https://packagecontrol.io/packages/Debugger works the samé as with VS Code. But you need to install Terminus too for it to work.


Thank you. I tried SublimeGDB. Yours seems nice but also heavy in config and integration into Sublime.

What I'm after is the other way around : an editor around GDB.

  > you need to install Terminus
It's not mentionned in the page. How would one know they need it ?


The only thing I needed to configure are the paths to the executables to debug and their command line arguments. This is for LLDB, but GDB works the samé, set the type to `gdb`. https://forum.sublimetext.com/t/debugger-for-c/73001/5

This adaptér is used for GDB https://github.com/WebFreak001/code-debug#debug

Somewhere there is a mention of Terminus integration, practically it doesn't work without.


Have you tried setting up a build command in Sublime Text to run gdb? I find it a bit easier for cli stuff that depending on a plugin. The json config is rather simple.


There is termdebug for Vim (should be included in Vim package itself) which lets you have a fancy TUI/editor together with the full power of GDB console.


Thanks, that's more like it. Though I don't fancy having to type `:Break` each time I need a break point. That should be a single click in the gutter.


The normal workflow for this kind of thing in vim is that you set up some keyboard shortcut that suits you in your personal configuration. Most people aren't manually using command mode for things like this.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: