Re: [Lazarus] Is there a setting to include debug symbols when starting from Lazarus only?

2023-04-19 Thread Giuliano Colla via lazarus

Il 19/04/2023 18:34, Bo Berglund via lazarus ha scritto:


Result:
When I use Release the symbols are not added and when using Debug, then the
symbols are added*and*  the executable name is changed to originalname.dbg.
This is of course on Linux, what happens on Windows I don't know.
originalname.exe.dbg would not work of course...


No, you have misunderstood. The executable name is unchanged. 
Originalname.dbg is *added*. It contains only the debug symbols. If you 
check you'll see that both originalname and originalname.dbg have 
exactly the same timestamp.


You have an option in Project->Options->Debugging, named "Use external 
debug symbols file".
If checked you get two files: originalname and originalname.dbg. If you 
uncheck it you get only originalname, but much larger.


With the external debug symbols file you may, if you want, deploy the 
debug version by releasing just originalname. It will be larger and less 
optimized than a release version, but it will be identical to the one 
you have debugged. The choice is yours.


Giuliano

--
Do not do to others as you would have them do to you.They might have different 
tastes.

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Is there a setting to include debug symbols when starting from Lazarus only?

2023-04-19 Thread Bo Berglund via lazarus
On Sun, 16 Apr 2023 13:32:12 +0200, Martin Frb via lazarus
 wrote:

>
>On 16/04/2023 11:15, Bo Berglund via lazarus wrote:
>> - Use Run menu Build or Compile: no symbols should be included.
>> - Click the green run arrow button then the symbols will be included.
>
>
>I think the closest you may get to this is build modes.
>
>
>But all and any button/key/menu always use the current mode. you have to 
>change it via the drop down on the toolbutton.
>
>
>projectgroups may offer a direct "build mode xxx"

Fixed it by creating two build modes (Debug and Release) on suggestion from
Lazarus itself in the Release dialog from Project Options.

Result:
When I use Release the symbols are not added and when using Debug, then the
symbols are added *and* the executable name is changed to originalname.dbg.
This is of course on Linux, what happens on Windows I don't know.
originalname.exe.dbg would not work of course...


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Is there a setting to include debug symbols when starting from Lazarus only?

2023-04-16 Thread Martin Frb via lazarus



On 16/04/2023 11:15, Bo Berglund via lazarus wrote:

- Use Run menu Build or Compile: no symbols should be included.
- Click the green run arrow button then the symbols will be included.



I think the closest you may get to this is build modes.


But all and any button/key/menu always use the current mode. you have to 
change it via the drop down on the toolbutton.



projectgroups may offer a direct "build mode xxx"

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Is there a setting to include debug symbols when starting from Lazarus only?

2023-04-16 Thread Bo Berglund via lazarus
Las 2.2.6/Fpc 3.2.2

I use the config item:
Project/ProjectOptions/CompilerOptions/Debugging/GenerateInfoForTheDebugger
in order to include symbols or not in the executable.

Now I wonder if there is some way to configure this such that it works like
this:

- Use Run menu Build or Compile: no symbols should be included.
- Click the green run arrow button then the symbols will be included.

I know there is a button next to the green arrow that has a little red x and the
hint: "Run without debugging"
But I think this is just for the execution of the program without the debugger,
right?

Or is this working such that both green arrows will add the debug info but only
the one without the x will actually *use* the debugger?

I would like to be able to build the release without symbols from the Run menu
but still use the green arrow to debug without having to change the setting
above.

Is this possible?


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus