Thank you n7800.
I followed the Wiki instructions to the letter and either I am misunderstanding the instructions or there is a problem with the instructions.
Here is what the Wiki says:
Debugging the IDE
Open a Lazarus instance (called 1st instance of Lazarus).
Compile the IDE as usual e.g. via Tools/Build Lazarus. Make sure you set up debugging flags like -g or -gw2. Best is to use the profile "Debug IDE" which contains many flags useful for debugging.
Open the ide\lazarus.lpi project (always with the 1st instance of Lazarus).
Compile this lazarus project (always with the 1st instance of Lazarus): another instance of Lazarus should appear (called 2nd instance of Lazarus).
Set breakpoints as needed etc in the opened source code (in the 1st instance of Lazarus), and play with 2nd run-time instance: for example, install a design-time static package *.lpk, then use, interact with this just installed package inside this 2nd instance.
Goal: I want to debug Lazarus v3.4. To do that I did the following:
Open a Lazarus instance (called 1st instance of Lazarus).
I opened (run) Lazarus v3.4 (this is, per the Wiki instructions above, the 1st instance.)
Compile the IDE as usual e.g. via Tools/Build Lazarus. Make sure you set up debugging flags like -g or -gw2. Best is to use the profile "Debug IDE" which contains many flags useful for debugging.
Went to "Tools -> Configure Build Lazarus" and selected "Debug IDE".
Immediately after that:
"Tools -> "Build Lazarus with Profile: Debug IDE"
Compile this lazarus project (always with the 1st instance of Lazarus): another instance of Lazarus should appear (called 2nd instance of Lazarus).
This is where the problems start.
I closed/exited Lazarus v3.4 (which I intend to debug) and started Lazarus Trunk (which I intend to use as the debugger).
I opened v3.4's Lazarus.lpi and as the instructions state, attempted to compile that project. That causes the MessageBox shown in the attachment to show up and inform me that there is "Nothing to do", "The project has no compile command."... etc. I did NOT make any changes whatsoever to the project.
I tried that step twice, once clicking "Cancel" which does nothing and another time clicking "Ignore". There is apparently no difference between them as far as the result.
Set breakpoints as needed etc in the opened source code (in the 1st instance of Lazarus), and play with 2nd run-time instance: for example, install a design-time static package *.lpk, then use, interact with this just installed package inside this 2nd instance.
Using Lazarus Trunk, I opened the Lazarus v3.4 .lpi project file, set a breakpoint and it _partially_ works.
I say partially because, in the Lazarus.pp file, the little blue dots that indicate where executable instructions are, are correct but, in the file "Application.inc", it is quite obvious that the blue dots are not on the correct lines. For some files, the dots seem to be in the right place while for others they are not. In some other files, they seem to start in the right place and then they get messed up.
See screenshots of various instances of incorrect locations of blue dots.
In Application.inc, it starts ok but gets messed up later (look at ActivateHint)
In Forms.pp, it's messed up from the very beginning.
Am I misunderstanding the instructions and/or doing something incorrectly ?
Obviously, if the blue dots are not on the right lines debugging becomes impossible.
Thank you for your help.