Author Topic: Debugging on Ubuntu  (Read 2073 times)

Offline xampp

  • Single posting newcomer
  • *
  • Posts: 3
Debugging on Ubuntu
« on: January 14, 2024, 11:19:28 am »
Hi, is there a tutorial how to setup debugging on Ubuntu?

All I'm getting are errors about terminals being closed or failing to set controlling terminal.

Google / YouTube / ChatGPT didn't help.

Thank you for your answers
« Last Edit: January 14, 2024, 11:22:16 am by xampp »

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 190
Re: Debugging on Ubuntu
« Reply #1 on: January 14, 2024, 03:53:56 pm »
Are you aware of the wiki/Debugging_with_Code ?

Offline xampp

  • Single posting newcomer
  • *
  • Posts: 3
Re: Debugging on Ubuntu
« Reply #2 on: January 16, 2024, 12:25:46 pm »
Are you aware of the wiki/Debugging_with_Code ?

Yes I am, I have the flags and path to gdb set but still no luck.

It has probably something to do with Linux permissions but I don't know what exactly is the problem so I'm looking for a step by step instructions

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 190
Re: Debugging on Ubuntu
« Reply #3 on: January 16, 2024, 04:07:07 pm »
There is a CodeBlocks manual which is quite good but I doubt that it conbtains step-by-step instructions. And I have not used anything else beside the wiki myself.

Normally Linux setup is pretty easy because there is with gcc and gdb a common compiler/debugger that can be istalled by the packet manager with little room for error. They use a standard setup and paths etc.

Depending on your level of knowlege it might be an idea to narrow down the area for the errors. Like
* make sure the components work separtely, like you can compile, run and debug a simple program on the command line
* if you have installed from some PPA or self-compiled uninstall everything (with apt purge) and install and test the default repository version. That should work out of the box.
 If that work and you other version does not, that points to a configuration error.
* remove your user settings and test the default settings. Maybe you have misconfigured something.
* If you are beginner thant you should know that CodeBlocks has two setup options for debuggers. CDB and GDB. CDB is windows only, so you must use GDB in Settings/debugger.

Thats very generic advice on a very generic info, obviously

Offline xampp

  • Single posting newcomer
  • *
  • Posts: 3
Re: Debugging on Ubuntu
« Reply #4 on: January 20, 2024, 03:58:53 pm »
@tigerbeard

Ok, thank you for your help  :D