Recent

Author Topic: Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra  (Read 3619 times)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra
« on: June 07, 2017, 12:50:55 am »
Hello, I know this question has been asked countless times but there seems to be a mass of conflicting information out there, and a lot of it is now out of date. So, can I ask, has anyone succeeded in being able to use an IDE based debugger, whether GDB or LLDB or anything else, in Lazarus 1.6.4 under Apple Mac Sierra 10.12.5? If so, how?

Following another thread on the subject, I disabled SIP protection, but that doesn't seem to have made any difference.

Thanks,
Carl
« Last Edit: June 07, 2017, 12:52:27 am by carl_caulkett »
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra
« Reply #1 on: June 07, 2017, 01:06:49 am »
So, can I ask, has anyone succeeded in being able to use an IDE based debugger, whether GDB or LLDB or anything else, in Lazarus 1.6.4 under Apple Mac Sierra 10.12.5? If so, how?

For the foreseeable future, I would suggest just creating an Xcode project for your Lazarus project and debug your app in Xcode. This Xcode project can be temporary or you can use it alongside Lazarus as a way to add things to the app bundle that Lazarus can't do, meaning you would need to do them manually or with a script.

https://macpgmr.github.io/ObjP/ProjectXC.html


carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra
« Reply #2 on: June 07, 2017, 06:11:39 am »
Thanks a lot, Phil. That does seem quite involved! However, it's a lot better than not being able to debug at all! I'll give it a go.

Cheers,
Carl
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra
« Reply #3 on: June 17, 2017, 01:30:55 pm »
Hello, I finally got round to giving it a go. It works! Many thanks.
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra
« Reply #4 on: June 17, 2017, 06:14:27 pm »
There is a still a problem. I cannot see how to display the contents of Unicode strings. If I use local AnsiStrings then I can see the string contents. The trend in Lazarus, especially for new code is to use Unicode exclusively, but if we cannot debug UnicodeStrings then it makes life a bit difficult.
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: Debugging with Lazarus 1.6.4 with macOS 10.12.5 Sierra
« Reply #5 on: June 22, 2017, 01:59:45 pm »
On Googling further, I see that the problem is not limited to Lazarus. I had issues using the TJsonConfig class which deals exclusively with UnicodeStrings but  I've written a wrapper class which handles the conversion back to AnsiString.
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

 

TinyPortal © 2005-2018