Forum > Debugger

[Resolved] Debugging libraries

<< < (2/2)

avra:
https://wiki.freepascal.org/FPC_recompilation_automation

Nimral:
Thnx Avra!

Nice script you got there, but what is it supposed to do? It doesn't seem to take any parameters, so while showing how to use "make" to rebuild fpc it does not help turning on  or off debugging. Did I miss something?

Think it does also contain a little glitch:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---c:cd c:\Prg\Lazarus\TrunkAll\fpcsrc 
should, IMHO, read


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---cd /d %FPCUPDELUXEDIR%\fpcsrc 
Armin

avra:

--- Quote from: Nimral on May 29, 2022, 10:03:04 am ---Nice script you got there, but what is it supposed to do? It doesn't seem to take any parameters, so while showing how to use "make" to rebuild fpc it does not help turning on or off debugging.
--- End quote ---
There is always space for improvement. You can see that -j %THREADS% FPMAKEOPT="-T %THREADS%" was used as a parameter on several places. You can make it a new environment variable and make parameters also configurable. Then deciding whether you want debugging or not would be a piece of cake.


--- Quote from: Nimral on May 29, 2022, 10:03:04 am ---Think it does also contain a little glitch
--- End quote ---
Nice catch. Feel free to fix it. If you don't, then I will when I find some time.

Nimral:
Hi Avra,

I didn't mean to despise your script, I just don't think it resolves my problem.

IMHO a real "solution" to the problem needs to integrate seamlessly with Lazarus's build ecosystem, it should follow the "debug" and "release" config setting, and also be able to detect the last build mode of the FCL so it does not rebuild if there isn't any need to do so.

For now I have found a working solution by - once again - installing a second Lazarus through fpcupdeluxe with debugging for LCL and FCL turned on, this will do for my purposes. I suspect I found the reason why this didn't work when I tried last year:

In fpcdeluxe's "Advanced settings" (--> see attachment), in the "Options Override" section to the right of the field to input options, there is a "Debug" checkbox. I suspect that I probably had checked the checkboxes only, and that this alone did probably not produce the desired results. I entered  -g -gw2 -O- now (like suggested in the wiki) and it seems to work now.

 :-* Anyone here who can explain what the "Debug" checkboxes are good for, and how they work in conjunction with what can be entered in the input fields? :-*

Armin.

P.S. I leave the honour of correcting the glitch to the author.

Navigation

[0] Message Index

[*] Previous page

Go to full version