Short: How can you find errors in a package/class without importing the .cls/.sty file to your project/without using the package?
Note: I'm looking for a general way of checking package/class errors, not for help locating (specific) errors in the V1 package.
I've been writing packages (.sty) and classes (.cls) recently and sometimes when I load them I get errors that occur in the package/class files. I write LaTeX in Overleaf and to use my packages and classes I import them from a project where I keep all my .sty/.cls files. So the file in the project looks like this:
The problem is that if it is an error in the package, it will only appear in the main.txt file and it will not show where in the package (.sty) the error is.
But it works just fine when I do not use the package V1, so I know the problem is either inside the package V1 or something regarding the package V1.
Sometimes it can be missing $$ that cause errors, or other things. The annoying thing is it will only display the error where I load the package and not in the package itself. So in this example, I have to read through the entire package and maybe guess where there are missing $-signs.
So my question(s) is:
How can you find errors in a package/class? How can you do that without using/importing the package? Is there a way to check for errors and display them without having to test the package and commands in a document.txt file? A button that checks the .cls/.sty file for compiling errors or something?