I created some java scripting in the moduleDevelopment folder of my ignition project. The java code works, but I want to debug it.
When I start debugging in Visual Code and set a breakpoint on a specific line, the breakpoint will hit. Except it looks like somewhere else in the code.
When the breakpoint in a while look which I know should loop for 6 times, the breakpoint also hits 6 times.
Each time it looks like the code stops at function "public PyObject _call_(PyObject self, PyObject[] args, String[] keywords)" of module "PyReflectedFunction.java" on line "o = m.invoke(cself, callData.getArgsArray());"
Java is not a script, Javascript is not normally usable in Ignition, Ignition runs a Jython interpreter to run python code inside the JVM. The code you have there looks something like a breakpoint that is hit when you are running python code in the Jython interpreter and the breakpoint is hit on the Java side in the JVM.
This sounds like a folder you have created on your own, where exactly is it located?
You can make sure the gateway you are attaching to is using the same version of dependencies as your IDE build configuration, but even then, when you step into a compiled source file you're asking your IDE to decompile it. Line numbers will never match up exactly.