How to debug 500 (Internal Server Error) (Calendar)

Hello,
I was working to add url link into Calendar (scheduled appointment). Worked with JS files
I got 500 (Internal Server Error).
After that, I returned back everything. However, I am still getting 500 (Internal Server Error). I do not know what is the issue.

https://testopenemr.indigoarc.com/interface/main/calendar/index.php?module=PostCalendar&func=view&viewtype=day 500 (Internal Server Error)

I tried to debug it. The problem is in this code line
interface/main/calendar/includes/pnMod.php
function pnModFunc ($modname, $type, $func, $args = array())
return $modfunc($args);

  1. Where is the $modfunc function it is $modfunc = PostCalendar_user_view ? Is it dynamic function , do you store this function in the database?

  2. How to debug 500 (Internal Server Error) ? It does not show what exactly the issue ?
    Thanks