Usually we have to debug on server, while debugging option is not enabled. Right way to enable it from AX server configuration utility, but some Ax server configuration utility needs is on default setting and any setting on Configuration utility is un-Affordable due AOS service going to restart.
On other way is to enable debugging option through Window registry. It helps me to enable debugging on server without restart of AOS server.
Windows => run write REGEDIT
Expand HKEY_LOCAL_MACHINE => MICROSOFT
Dynamic => 6.0 =>configuration => Original (install configuration) => xppdebug
Set xppdebug to zero