Incorrect warning messages appear while debugging client code with breakpoint on Studio. Sometimes the messages start to spam dozens if not hundreds of times making impossible to check my prints. Breakpoint operations (step into, etc) are extremely slow while those messages keep printing.
Problem happens when the module was moved from a server storage to a shared storage before it was used by the client.
The warning messages are always this two. I’m not sure if they always appear together but it looks like it.
- PrivateServerId cannot be checked on the client, please check on the server.
- PrivateServerOwnerId cannot be checked on the client, please check on the server.
This messages don’t make any sense for two reasons. First, they never print if I don’t stop the code with a breakpoint. Second, they appear in code bases where the client never read PrivateServerId or PrivateServerOwnerId. To prove my point, there is a minimum reproduction place attached below to check this bug. In the place, I just move a dummy module from ServerScriptService to ReplicatedStorage. Then, I call the module from the client and stop on
print("foo") because of a breakpoint. The message appear after 1-2 seconds.
Today. I’ve debugged a production game that didn’t have this problem last month and it also happened there. I didn’t edit the code of this game. I just added a breakpoint on the conditions that I explained above.
Let me know if you need any more details.
2022_06_01_BreakpointBug.rbxl (34.7 KB)