Debugger do not find executable - customed directories layout lazarus / 12-Debugger ---------------------------------------------------------------------- thierrybo · 2009-11-16 09:35 Hi, I usually have no problem using debugger. However today I tried to use this folder layout : - Project --- bin ----- debug ----- release --- src --- units ----- debug ----- release Lazarus project files are in /src/ To get exe files in /bin/debug/ and other files in /units/debug/ I set units output directory to ..\units\debug in path tab (picture1) and directory for compiled program to -FE..\bin\debug\ in custom options of Other tab (see picture 2). The resulting command line option is Code: [Select]-FU..\units\debug\ -FE..\units\debug\ -oproject1.exe -FE..\bin\debug The second -FE switch  override the first one (added automatically by Lazarus if we fill the units output directory). This work fine if  I build the program but it does not if I want to run it for debugging. With such configuration, i get : Quoteno program file "C:\project\units\debug\project1.exe" found Debugger does not look for the compiled program in /bin/ folder but in /units/. I tried to move the units output directory from the path tab to the custom options : Code: [Select]-FE..\bin\debug\ -FU..\units\debug\ but this time I get: Quoteno program file "C:\project\src\project1.exe" found This time the debugger look for the compiled program in /src/ folder. I would like to know if I missed some options or if I can submit a bug report. ---------------------------------------------------------------------- thierrybo · 2009-11-16 09:41 I found a way to solve this : Units output path in path tab to : ..\bin\debug and NOT to the units path, as it seems Lazarus only use the path set here for looking the compiled program when debugging. then in custom option I override this path : -FU..\units\debug\ ---------------------------------------------------------------------- Vincent Snijders · 2009-11-16 10:18 Try setting the Target file name (including path) in the Project Options. ---------------------------------------------------------------------- thierrybo · 2009-11-16 17:46 Thanks, I tested your solution, even with a relative path and it works: Target file name in the Project Options : Code: [Select]../bin/debug/project1 Units output directory in path tab :Code: [Select]../units/debugNothing in custom options and resulting compiler options: Code: [Select]-FU../units/debug/ -FE../bin/debug/ -oproject1 With mine the resulting compiler options are: Code: [Select]-FU../bin/debug/ -FE../bin/debug/ -oproject1 -FU../units/debug/ However I think I will keep mine because I look for a generic set of options that I can quickly switch to with the load compiler option window. With yours, each time I have to load a compiler profile, I have also to change path in Project Options (at least as far as the Target file name in the Project Options is not saved with compiler options) . There is however a small drawback with my solution, the project1.compiled file keeps being created in /bin/ folder, not in /units/ one.