Recent

Author Topic: Lazarus runs in debug mode - how to change it?  (Read 5955 times)

LXC

  • Newbie
  • Posts: 6
Lazarus runs in debug mode - how to change it?
« on: September 10, 2016, 03:14:15 pm »
Hi
I'm very new here (to Lazarus) so please forgive a very simple question.
I'm trying to develop a very simple application for a study project. Literally building it form for form and then testing each step as I go along.
When I "run" to check that all looks ok, it always executes in debug mode. I've not asked it to debug (I don't think), just clicked run.

Any reason why? Any way to change this?
I see there are various debugger options which I don't want to switch off because I'm sure I'm going to need the ability to debug in the future, I just don't want it to debug until I ask it to.

thanks for any help.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus runs in debug mode - how to change it?
« Reply #1 on: September 10, 2016, 05:14:39 pm »
If you're willing to use development version, there's "run without debugging" menu entry now. Otherwise, run will always run under debugger, even when you don't put debugging info on.

LXC

  • Newbie
  • Posts: 6
Re: Lazarus runs in debug mode - how to change it?
« Reply #2 on: September 10, 2016, 05:25:21 pm »
Cool, thanks for the speedy answer! I thought I was doing something wrong.

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Lazarus runs in debug mode - how to change it?
« Reply #3 on: September 10, 2016, 05:42:22 pm »
That's probably not what you mean, though......

Choose Project|Project options|Compiler Options and check the checkbox "Build modes".
Then generate debug and release modes, that will be done for you.
Then choose "release"  mode for your project.
That also gets rid of the bulk of the executable size and your app will run close to full speed.
(It still is larger than it should be.. afterwards use strip or compile from the command-line)

Lazarus is not very friendly to choose release mode by default - to put it mildly. Certainly not for beginners.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018