Bug 50345 - Environment set in "Run Options" is ignored when launching debugger
Summary: Environment set in "Run Options" is ignored when launching debugger
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 3.0.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop-Devel List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-07 15:57 UTC by Alexandros Karypidis
Modified: 2007-03-29 15:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandros Karypidis 2002-11-07 15:57:03 UTC
Version:           3.0.0 (using KDE KDE 3.0.8)
Installed from:    SuSE RPMs
Compiler:          N/A N/A
OS:          Linux

In Gideon's project options, you may specify:
	1. which is the "main executable"
	2. what environment variables are needed
under "Run options".

While the first hold for the debugger as well, the latter does not.

I came across this when doing a rather complex setup with sub-projects to test the "Automake manager". In order to run the "main executable" I need to set an appropriate LD_LIBRARY_PATH. This works ok when I run the program, but I can't debug it because when Gideon starts the debugger it does not set the environment variables I defined in "Run options".
Comment 1 Amilcar do Carmo Lucas 2003-04-05 15:59:39 UTC
Solved in Kdevelop3.0 A4
Comment 2 Thomas McGuire 2007-03-29 14:43:03 UTC
Reopening...
I tried with KDevelop 3.4, and it seems not to work.
I guess this is because KDevelop now uses the MI interface.
Comment 3 Andreas Pakulat 2007-03-29 14:52:51 UTC
And closing again, it works fine for me here, else I wouldn't be able to debug KDevelop4. And I do know that the code does set the environment, because I changed it to do so.
Comment 4 Amilcar do Carmo Lucas 2007-03-29 14:56:35 UTC
You set your arguments in:
Project -> Project Options -> Run Options -> Debug arguments ?

Or are you talking about:
Project -> Project Options -> Run Options -> Environment Variables ?

Maybe you should update to KDevelop 3.4 from SVN ?
Comment 5 Thomas McGuire 2007-03-29 15:06:10 UTC
Strange, I get the following error when trying to debug KMail:
>Configuration file "$HOME/.kde4/share/config/kmailrc" not writable.
This indicates that $HOME is NOT correctly expanded.
Soon afterwards KMail crashes, which it does not when expanding the variables myself in the Run options.

I currently can not compile the SVN version because of errors, so I use the 3.4 version.

I set the environment variables in
Project -> Project Options -> Run Options -> Environment Variables 

In the debugger window, I get the following:
>(gdb) set environment KDEHOME=$HOME/.kde4
>set environment KDEHOME=$HOME/.kde4
>^done

But still, they seem not to be expanded.
Comment 6 Thomas McGuire 2007-03-29 15:29:39 UTC
Sorry, this was actually a different issue, see my newly created bug 143589.