Ok, made the change and reproduced the issue.
The I noticed the MacOs in the first line here ...
s := AFileName + PathDelim + 'Contents' + PathDelim + 'MacOs' + PathDelim + copy(s, 1, Length(s) - 4);
if (FileExists(s)) then AFileName := s;
debugln(['AFileName = ',AFileName,' s = ',s, ' err = ',fpgeterrno()]);
I changed that and recompiled, the issue has now gone away so I haven't included any debug logs
Then I did a quick search for MacOs in other files under ./components and found it
at line 353 of components/fpdebug/fpimgreadermacho.pas:
i := pos('/Contents/MacOs', fname);
and at line 2227 of components /lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas:
Are defines case-sensitive?
I haven't changed anything in these two.
I don't know anywhere near enough of the inside of Lazarus, or doing updates with svn etc so can I please leave it to you to the necessary there?
Cheers