Bug 143589

Summary: Debugger does not expand environment variables (dollars)
Product: [Applications] kdevelop Reporter: Thomas McGuire <mcguire>
Component: CPP DebuggerAssignee: kdevelop-bugs-null
Status: CONFIRMED ---    
Severity: wishlist CC: ghost
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas McGuire 2007-03-29 15:28:39 UTC
Version:           3.4 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

When setting some environment variables in Project->Project Options->Run Options->Environment Variables and these variables contain other variables with a dollar in them (like $HOME/.kde4), the debugger does not correctly expand these dollar variables to their substitutes. 

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

Instead, it should automatically expand $HOME so this becomes:

>(gdb) set environment KDEHOME=/home/kde-devel/.kde4
>set environment KDEHOME=/home/kde-devel/.kde4
>^done

Note that this works fine for running programs with Build->Execute Program.
It should work in both cases.
Comment 1 Andreas Pakulat 2007-03-29 15:59:14 UTC
This is a wish. We just don't do that.
Comment 2 Vladimir Prus 2009-12-27 11:17:54 UTC
Does anobody know the right way to expand environment variables in a KDE program?
Comment 3 Andreas Pakulat 2009-12-27 11:58:21 UTC
There's the KMacroExpander namespace with some expand functions, but they require <somechar>{} quoting of the to-be-expanded variables. However there's currently no support whatsoever for using env vars in the value of other env vars in our env var config.