Debug and Release build modes [SOLVED]
lazarus / 9-Editor
----------------------------------------------------------------------
YiannisKam · 2023-03-04 20:07
Hello, for the time being I use the set my build modes by navigating
through Project - Project Options - Compiler Options and choose Build
and Release modes there. The problem is that I have to do the same
steps every time I create a new project. I don't want that, I want my
configurations to persist and have my Debug and Release always fixed.
Is there any way to achieve this?
----------------------------------------------------------------------
TRon · 2023-03-04 20:17
check set compiler options as default in the project options dialog ?
for a location see left bottom (above help button) at picture, see: ht
tps://wiki.lazarus.freepascal.org/IDE_Window:_Project_Options#Changing
_the_LCLWidgetType_in_Version_1.1_and_above
----------------------------------------------------------------------
YiannisKam · 2023-03-04 20:23
I've tried that already but unfortunately it doesn't work.
----------------------------------------------------------------------
TRon · 2023-03-04 20:34
I just checked with Lazarus 2.2.4 and it seems to work for me. e.g.
when i check the option as mentioned, then add build modes , then
press the ok button, then Lazarus stores the newly created buiold
modes and keeps the settings in a global manner when I open up a new
project and select a specific build mode (build mode that I just
created). Whether or not I close and start Lazarus again does not seem
to matter.
Which version of Lazarus are you using ?
edit: You can check for yourself by viewing the file named
projectoptions.xml in your Lazarus configuration directory, which
should contain the new created build modes.
----------------------------------------------------------------------
YiannisKam · 2023-03-04 20:39
My lazarus ide version is 2.3.0
----------------------------------------------------------------------
TRon · 2023-03-04 20:43
Also works for me with Lazarus 2.3.0.
Could you share your Lazarus revision (date might work as well) and
platform please ?
----------------------------------------------------------------------
YiannisKam · 2023-03-04 20:54
Sorry TRon, my bad as I had to check the rightmost boxes, then check
the set compiler options as default and finally save everything. Now
it works . Anyway thanks for your time, I really appreciate it.
----------------------------------------------------------------------
TRon · 2023-03-04 21:13
No problem YiannisKam.
Just a misunderstanding on how Lazarus expects in what order things
needs to be done exactly.
Thank you for reporting back.
----------------------------------------------------------------------
stefankr · 2023-03-12 14:23
Hello, and apologies for bringing this up again, but I am still having
the same issue on 2.2.4 on Windows 10. Even tough I followed the
advice in this thread. I click on "create debug and release modes",
then check the two boxes for debug and release "in the session", but
not checking them doesn't change anything either. Then I confirm with
OK, check "set compiler options as default", then click on OK. Now
when I start a new project, I only have the defaut mode. What else can
I do to make this work? Thank you in advance for your help.
----------------------------------------------------------------------
YiannisKam · 2023-03-13 01:16
I don't have an answer because it worked for me for a while but now I
see only the debug option in my settings. The release setting
disappeared completely and I have to set it manually again and again,
no matter how many times I have to save the new settings. And I've
tried every possible setting combination. It doesn't make any sense so
I quit.
----------------------------------------------------------------------
YiannisKam · 2023-03-14 02:29
Ok, final comment here as I managed to solve the problem by editing
manually the projectoptions.xml file. Code: XML
[Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
For some
reason which I have no idea why the was missing.
I hope this helps if someone has the same issue. Just navigate into
your lazarus installation folder and inside the config_lazarus folder
resides the projectoptions.xml file
----------------------------------------------------------------------
PeterX · 2024-08-15 15:22
Quote from: YiannisKam on March 04, 2023, 09:07:57 pm.. I have to do
the same steps every time I create a new project. I don't want that, I
want my configurations to persist and have my Debug and Release always
fixed.
Is there any way to achieve this?
Sorry for stepping in here this late .. I use a separate INCLUDE file
with .. for example:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i {$IFDEF
DEBUG_VERSION} // Compiler Switches: {$ASSERTIONS ON} {$DEBUGINFO
ON} // Include debugging symbols // {$HINTS ON}
// keep hints ON .. // {$IOCHECKS ON} // Include
Input/Output checking. {$OVERFLOWCHECKS ON} // enabling overflow
checking slows down your program .. ! {$RANGECHECKS ON} //
enabling range checking slows down your program .. ! {$Warnings ON}
// allow warnings .. // {$ELSE} // Compiler Switches:
{$ASSERTIONS OFF} // same as $C- {$DEBUGINFO OFF} // no
debugging symbols {$HINTS OFF} // no short switch defined
in Delphi {$IOCHECKS OFF} // same as $I- {$OVERFLOWCHECKS
OFF} {$RANGECHECKS OFF}{$ENDIF}
Indeed this is a little bit "OldStyle", but works for me
----------------------------------------------------------------------
YiannisKam · 2024-08-15 17:29
Interesting, thank you