How do I set environment variables for the debugged process

Sysprogs forums Forums VisualGDB How do I set environment variables for the debugged process

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #881
    Anonymous
    Participant

    I’ve tried

    Custom debug steps
    Remote console

    (Check) Use the following command to start the console:
    Command: (blank)
    Arguments: (blank)
    Working directory: (blank)
    Additional environment: PATH=%PATH%:$(BuildDir)objslib|ANDROID_PRODUCT_OUT=V:aaosp64outtargetproductgeneric_x86_64|ANDROID_BUILD_TOP=V:aaosp64
    (Check) Run locally

    When I start up, the inferior process gets system wide env variable settings instead of my overrides.

    emulator: found Android build root: V:aaosp
    emulator: found Android build out: V:aaospouttargetproductgeneric_x86

    #3323
    Anonymous
    Participant

    I wonder if it is really possible due to SSH restrictions.

    I found a workaround by replacing gdbserver on target by a shell script that set the environment variables before launching the real gdbserver. It works even if it is not really nice!

    #3322
    support
    Keymaster

    Hi,

    The custom remote console does not affect Android emulator options. It simply allows running a custom program and showing its output inside Visual Studio. E.g. if your program produces output via a TCP port, you can specify telnet : as the custom console and you will be able to see the output.
    VisualGDB does not start Android emulator automatically. Instead it can launch the AVD Manager to let you launch it manually. If you want to override the environment that goes to the emulator, you need to either override the Visual Studio environment, or run the AVD Manager with the modified environment manually.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.