1
  • VSCode v1.14.2
  • macOS 10.12.6 Sierra
  • lldb -version: lldb-370.0.42
  • Lazarus 1.8.0 RC3
  • FPC 3.0.2

Hi Wosi (or anyone that can help!),

As you may know debugging Lazarus/Free Pascal on macOS Sierra is problematic because of issues with GDB. This forces us to debug our apps in LLDB using Xcode as the environment (see here: https://macpgmr.github.io/ObjP/ProjectXC.html).

This works reasonably well but I would prefer to use OmniPascal/VSCode.

I have investigated the VSCode extensions "LLDB Debugger" v0.5.4 and "Native Debug" v0.21.2, and while the "Native Debug" extension allows me to set breakpoints, it appears to be not sufficiently developed yet to be suitable for actual use.

To recap then, do you have any ideas for how I can debug Lazarus/FPC apps on the Apple Mac using LLDB and VSCode/OmniPascal?

EDIT: I have made some progress using Native Debug, although there are some problems accessing class type variables. This is described here: https://github.com/WebFreak001/code-debug/issues/118

  • I'm currently having similar issues. I've managed to get some breakpoints working with Native Debug yesterday but it wasn't a satisfying experience at all. Breakpoints only worked in some files and variables didn't show up properly. I'd love to help you with your problem but I can't do it now. Maybe there is anybody who knows more about the internal details of LLDB and how to use it on FPC generated code. – Wosi Jul 26 '17 at 20:21
  • 1
    You might want to ask about this on the lldb-dev mailing list: http://lists.llvm.org/mailman/listinfo/lldb-dev. Some of the Embarcadero folks made contributions to the Pascal support a while back - though IIUC most of their support was on a private fork and not contributed back. I don't know the status of Pascal but somebody else on the list might. – Jim Ingham Jul 26 '17 at 22:40
  • Thanks, Wosi. In a weird way, it's reassuring to know you're having the problems as I am. –  Jul 26 '17 at 23:08
  • Thanks, Jim, I'll consult the lldb-dev mailing list in the morning. I'm too tired now, TBH! –  Jul 26 '17 at 23:09
  • Hi Wosi, you might like to check out the forum at https://github.com/WebFreak001/code-debug/issues/118#issuecomment-318144568 again. I made a breakthrough in terms of using LLDB by itself, and hopefully, https://github.com/WebFreak001 will be able to use that information. –  Jul 27 '17 at 10:32
  • Disaster! Suddenly, and for no reason that I can think of, my breakpoints with Native Debug have stopped working altogether. Looks like my plans to use Native Debug have just been blown out of the water. Back to Xcode I guess. :-( –  Jul 27 '17 at 15:01
  • It's OK, you can relax everybody! My debugging is back in VSCode again. Hurrah! –  Jul 27 '17 at 20:34

0 Answers0