Ask open ended questions related to those topics, and pay attention to the answers carefully
I had some problems very similar to these at a job, and I wanted to avoid that at my next job. There's always an open ended question you can ask that is appropriate to ask, that does not require you to say anything about what your current or previous jobs were like.
For instance, instead of asking
Are you really petty and yell at people over typos?
You could ask something like
How do you give feedback to your subordinates?
Instead of asking
Will I have two bosses who each give me contradictory stuff to do? Because that shit sucks ass at my current job.
You can ask
How is the team organized? Who would I report to?
Instead of asking
Are we screwed into using shitty Windows 10 and shittier Notepad?
You can ask
What development tools does your team use? Do engineers on your team have their own choice of tools?
The trick here, is that you never say anything about your current job, you're just probing generally about the job your interviewing for.
Racism is a really tricky thing to bring up, in that nobody will ever say "Yeah racism is totally cool with us!" but I find the easiest question for things like that is to ask
What is the culture like at your company?
It requires some effort to answer, and it's an immediate red flag if you hear two people give a word-for-word identical answer.
Also, if you are interviewed by an employee who is not a manager, I always ask:
Do you like working here?
Some people will admit that they do not, and the reason why.
forced to use shitty development tools like Windows 10 and Notepad for the text editor- That's a completely subjective statement. As for the rest, I don't see how you could "suss" these things out prior to actually taking a job. – joeqwerty Apr 25 '19 at 21:22