3. Somebody (a person before me) created a custom version of /libs/sling/servlet/errorhandler and placed it in /apps/sling/servlet/errorhandler
My question is on how to do debug the custom JSP page. I placed a breakpoint in the JSP on IntelliJ and it's not stopping on the breakpoint. I know the debugging works as the custom JSP uses a Java class (consisting of 10 lines only) and if I placed a breakpoint somewhere in the class, it stops at that point.
3. On the file system go to crx-quickstart/launchpad/felix/bundleX/data/classes where X is the Id value from step 2.
4. You can add that folder to the source code debug search path of your Eclipse or IntelliJ project for debugging of the jsp.java files. I am assuming here that we are debugging on a local AEM instance. Otherwise you would have to download the files from that folder to your machine for debugging.
This isn't quite as easy as debugging the actual JSP file. However, it is useful as you can figure out which line of the jsp.java file maps back to in the non-compiled jsp file.
using your instructions, I found the bundle ID to be 499. I then loaded the folder inside IntelliJ and then created a new debug configuration. I tried debugging the code and I keep on getting "Source code does not match byte code".