You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Placing a breakpoint in my Main class causes 'Null Object Reference' error #32
As soon as it hits any breakpoint it errors and quits.
No breakpoints = no error.
Other projects do not have this error... There must be something in my script that triggers this but it's very large and I've yet to find the cause.
Sorry for being late. I encountered a similar issue and have pinpointed the cause. I hope this helps.
Please check if there's a getter like this in the class where your breakpoint is located:
If it is called when the breakpoint is reached, an error will occur.
Even if the getter isn't actually called, or even if it's never called, an error will still occur.
I believe there are two reasons for this issue:
In VariablesPrinter:240, an attempt is made to log the values of fields and properties after the breakpoint is entered. This means an implicit function call (the getter) occurs, and it's entirely possible that the function will fail.
This line is clearly surrounded by a try_catch block, but in reality, a ThreadInfo.STATUS_STOPPED_BREAKPOINT event is reported before the error is caught. This event is then handled by Server.hx:560. The result is an ExceptionStop message sent to the debugger, before the catch.
Finally, you encounter an error. If this is the case for you, you can wrap the getter in your business code with a try_catch block.
Activity
LviatYi commentedon Sep 10, 2025
Sorry for being late. I encountered a similar issue and have pinpointed the cause. I hope this helps.
Please check if there's a getter like this in the class where your breakpoint is located:
Even if the getter isn't actually called, or even if it's never called, an error will still occur.
I believe there are two reasons for this issue:
Finally, you encounter an error. If this is the case for you, you can wrap the getter in your business code with a try_catch block.
I'm still investigating a fix for the debugger.