Is there any way to identify the process that is debugging my process?

  anti-debugging, c++, debugging, winapi, windows

I’m not used to working with stackoverflow, sorry.

If you look up Anti-Debug on the Internet, you will find a lot of information. For example, isDebuggerPresent and NtGlobalFlags were found in the search. However, my process can only protect itself from the debugger by terminating its own process when it detects it.
I would like to know how to prevent the debugger from attaching in the first place, or how to identify and detach the debugger process.

Thank you.

Source: Windows Questions