[lazarus] Display option problem..
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
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 ) 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
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  doesn't get called and before and after the  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