[lazarus] Display option problem..

Jesus Reyes jesusrmx at yahoo.com.mx
Fri Aug 1 16:46:27 EDT 2003

Sorry, the email thread was stored in other computer, 

Don't think so. But somewhere the DISPLAY variable is lost.
Maybe you want to find out yourself:
The environment variables are given to the debugger in
debugmanager.pas line 1338:
You can add a writeln(FDebugger.Environment.Text); to see the
If you follow the AssignEnvironmentTo with "find declaration" you
will see,
that there is not much code in there. It fetches the current env vars
replaces the overrides.
The debugger creates a TProcess and assigns the variables to it in 
debugger/cmdlinedebugger.pp line 180.
Just add a few writelns to find out, where the DISPLAY variable is

I tried that. 

It seems that when the Fdebugger creates the debugger process (the
first time the program is about to run) the environment (FEnviroment)
is empty (doRunProject->doInitProjectRun->doInitDebugger->
fDebugger:=TgdbMiDebuger.create [0]) and this value is used in the
CreateProcess call (deep into fDebugger.Init).

After that the call
tries to update the environment but it only assign to

It seems that this value (I can confirm that it is the wished
environment) is never propagated? to the debugger running process
before running the application. The application doesn't receive the
intended enviroment in my case, I added the following line to the
application code:

WriteLn('DISPLAY env var= ', GetEnvironmentVariable('DISPLAY'));

it should display: DISPLAY env var= quimica:0.0 but it gives: DISPLAY
env var= :0.0

in next runs [0] doesn't get called and before and after the [1] call
 the enviroment that shows it's ok, so I think it is just not
propagated? to the running debugger process but I'm not sure.


Jesus Reyes A.

Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

More information about the Lazarus mailing list