Although I use or have used Windows, various Linux, various UNIX and various Raspberry Pi systems, my favourite is probably Solaris UNIX. It seems to have some of the best tools to help doing serious debugging of complex programs where they go deep into the operating system.
It will vary however based on the language(s) that you will be developing in. For example, while working on some low level interrupt handlers for a Windows system, I found working on a true MSDOS system was the most productive.
Beware of compilers that bug out on the first error they encounter. In a large program they can make debugging syntax errors a tedious process. Another compiler for the same language may run through the whole source code and produce a list of all the things it objects to in one run, which I find makes debugging much faster.
Ultimately it depends what sort of software you are trying to develop. If you can find an IDE (Integrated Development Environment) for the language and applications you want to work with, these will often allow you to step through line by line to see where errors are occurring, and even change the values of variables to correct an error to allow you to continue testing before the code leading to the error is formally corrected.
Watch out for languages like Python (and other interpreted languages). These may only find an error when a specific bad code sequence has to be executed. A program may appear to work until a specific set of data is processed that takes it down a rarely used code path, at which point the Python interpreter may throw the program out.
I hope this helps.