PATH variable expansion when calling custom step

Sysprogs forums Forums VisualGDB PATH variable expansion when calling custom step

This topic contains 3 replies, has 3 voices, and was last updated by  support 2 weeks, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #23916


    I am adding some automation scripts to my VisualGDB embedded project using the ‘Custom Step’ hooks in Properties. It appears that the %PATH% environment variable in Win10 is not being transmitted correctly to the child-process. It is restricting the ability of custom scripts to call programs/utilities that would normally be on the user’s path. I prepared a simple project to demonstrate this. The project calls a very simple script ‘printer.bat’ in the ‘C/C++–>Custom Step–>Custom post-compile tool’ that prints out the %PATH% variable and arguments to the console.

    The script contains:

    @echo off

    echo %PATH%
    echo %0 %1

    The built output of the LEDBlink with custom-step that results is as follows:

    Note that ‘printer.bat’ did not receive the %PATH% correctly. I am hoping this can be corrected and not an issue with underlying GCC toolchain. It looks like that at some point, some code does not expand %PATH% before executing the custom-step. Or maybe it has to do with that forward-slash that has snuck its way into the toolchain directory string. Any guidance would be appreciated, thanks.




    Looks like your support period has expired. Please renew your key here or let us know the updated email if you have purchased a different one and we will help you resolve this.



    I determined the same problem with the path variable (Windows 10, Visual Studio Pro 2019 16.11.14; VisualGDB 5.6R5 build 4569).

    The follwing batch script will print a not expanded path variable. Seems to be a mistake by adding the compiler bin path to the path variable.

    <span style=”text-decoration: underline;”>batch script:</span>
    echo path:

    <span style=”text-decoration: underline;”>output:</span>




    Unfortunately, it is hard to suggest anything specific based on the description you provided.
    In order for us to provide any help with this, we need to be able to reproduce the problem on our side.
    Please provide complete and detailed steps to reproduce the issue as described below:

    1. The steps should begin with launching Visual Studio. They should include every step necessary to create the project from scratch and reproduce the issue, as many issues are triggered by specific combination of project/target settings.
    2. The steps should include the expected/observed behavior, so that we could follow them on our side and compare the outcome.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.