Lazarus 1.6 - Slow start after compiling my own application lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Hansaplast · 2016-04-05 10:31 I would like to thank the Lazarus team, for their hard work! I really like working with Lazarus, I very much admire and respect the hard work by all involved, and I'm happy to see development is still going strong. I wish I was more capable so I could assist on development for Mac (Cocoa). Unfortunately, 1.6 has a dialog bug which makes it unusable ... (as others already have reported, and a fix can be found) - It might be a good idea to release a "fixed" version 1.6 for Mac users, so that new users will not loose interest because of this bug. Anyhoo, that's not my question for this post ... An issue I ran into is that in version 1.6, is that when you compile and debug an application, the freshly compiled application starts extremely slow (I have to wait about 2 minutes before a simple, empty and blank, application starts - this is on a quad core i7 @ 2.8 Ghz Macbook Pro with 16Gb of memory and plenty of space on the SSD). Compiling goes as fast as usual, so that's not the issue. The actual starting however takes forever. I suspect this is related to the debugger. I'm using the old XCode 4 gdb. Building my app in "release" mode (no debugging) and setting debugger to "none" starts the newly compiled application instantly. Now this could of course be an issue with my config, so I went back to 1.4.4, which works well again, as expected. Compiles and starts right away, even with debugger set. This kind-a brings me to a lingering problem that Mac users have been experiencing for quite a while now - the debugger misery. I know we have to tank Apple for dropping gdb support. But for most Mac users installing gdb from an old XCode (as said: OLD), using HomeBrew or MacPorts, is far from ideal. Installing Lazarus through http://www.getlazarus.org/ sounded tempting, but to be honest; I have no idea what I'll get with that one either. Installing from SVN is all nice, but it tends to make a mess on my Mac (different location etc). So for most users that's not a great way to address issues like that either - would it be an idea to allow updating from within Lazarus to (for example) the SVN version without picking a new location for the files? Any suggestions are most welcome ... ---------------------------------------------------------------------- balazsszekely · 2016-04-05 11:53 Your actual question is infinitesimally small, though it can be read after a copy/paste(please edit the question). Recently it was implemented a new feature(trunk), namely run the application without debugging(see screenshot), which completely avoids the debugger and launch your executable as an external program.  Since the debugger is pretty useless under OSX, I guess you can live without it. Another alternative solution is to run your application via Tools-->Configure External Tools.  Map a key combination to your configured external tool and you're good to go. Please note, you don't need Lazarus trunk for this solution to work. It can be done in 1.6. ---------------------------------------------------------------------- Hansaplast · 2016-04-05 12:06 Thanks GetMem for the reply ... OMG, I had not noticed the font size at 2 pixels ... I apologize for that - something that keeps happening in this forum when I edit stuff ... I fixed the post. Thanks again for letting me know! I have done some testing by running without the debugger, which is fine ... most of the time. Sometimes I'd like to step through my code though to see what went wrong. In 1.4.4 the XCode 4 gdb debugger works great and is pretty fast. Hence my question why this is so super slow in 1.6. I tried using the debugger from MacPorts (ggdb) as suggested in other post but with both 1.4.4 and 1.6 this keeps crashing (Oops, the debugger entered the error state ... we're pulling the plug). ---------------------------------------------------------------------- balazsszekely · 2016-04-05 12:15 QuoteOMG, I had not noticed the font size at 2 pixels ... I apologize for that - something that keeps happening in this forum when I edit stuff ... I fixed the post. Thanks again for letting me know! You're welcome! QuoteI have done some testing by running without the debugger, which is fine ... most of the time. Sometimes I'd like to step through my code though to see what went wrong.This is why "Run"/"Run without debugging" is so useful. QuoteIn 1.4.4 the XCode 4 gdb debugger works great and is pretty fast. Hence my question why this is so super slow in 1.6.Unfortunately I cannot answer to that question, but I suppose is OSX(not Lazarus) related, since gdb works fine under windows, linux, etc. QuoteI tried using the debugger from MacPorts (ggdb) as suggested in other post but with both 1.4.4 and 1.6 this keeps crashing (Oops, the debugger entered the error state ... we're pulling the plug).I know. This and other small annoying stuff convinced me to stop developing under osx. ---------------------------------------------------------------------- Hansaplast · 2016-04-05 12:25 Thanks again GetMem! I know Apple is to blame for dropping gdb ... not sure what they were thinking. It would be a shame though,... I've developed several tools with Lazarus (all freeware) on my Mac - of which most are multi platform. A few of them though, one of which seems pretty popular (ApplePi-Baker), is only for Mac OS X. I really do not like alternative development tools (like XCode), and would love to keep developing for Mac OS X. Maybe I'll go back to 1.4.4, or try to work with 1.6 without debugger for a bit and see how well that would work for me.