# Debugging java code breaks on different location in code

**URL:** <https://forum.inductiveautomation.com/t/debugging-java-code-breaks-on-different-location-in-code/115277>\
**Category:** Module Development\
**Created:** [April 28, 2026, 8:09am UTC](https://forum.inductiveautomation.com/t/debugging-java-code-breaks-on-different-location-in-code/115277 "2026-04-28T08:09:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roland.habraken](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@roland.habraken](https://forum.inductiveautomation.com/u/roland.habraken)\
**Post date:** [April 28, 2026, 8:09am UTC](https://forum.inductiveautomation.com/t/debugging-java-code-breaks-on-different-location-in-code/115277/1 "2026-04-28T08:09:53Z")

</div>

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());"

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a53eb406d8d285306395b148ed8dc435f87f808f.png)

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [April 28, 2026, 8:30am UTC](https://forum.inductiveautomation.com/t/debugging-java-code-breaks-on-different-location-in-code/115277/2 "2026-04-28T08:30:50Z")

</div>

> [@roland.habraken](#):
>
> java scripting

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.

> [@roland.habraken](#):
>
> in the moduleDevelopment folder of my ignition project.

This sounds like a folder you have created on your own, where exactly is it located?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 28, 2026, 7:43pm UTC](https://forum.inductiveautomation.com/t/debugging-java-code-breaks-on-different-location-in-code/115277/3 "2026-04-28T19:43:14Z")

</div>

> [@roland.habraken](#):
>
> 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.

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.
