# VisualGDB Project Variables

To avoid hardcoding absolute file paths in the VisualGDB project properties files, VisualGDB defines the following project variables:

 $(VISUALGDB_DIR) The directory containing VisualGDB.exe$(ConfigurationName) The name of the current project configuration $(ProjectDir) The directory containing the Visual Studio project$(ProjectDirUnixStyle) Project directory converted to ‘c/dir/file.cpp’ format. $(LocalSourceDir) Directory containing source files (path on the Windows computer): For Remote projects – source directory specified in file transfer settings For Custom projects – user-defined variable For other project types – equivalent to$(ProjectDir) $(RemoteSourceDir) Directory containing source files (path on remote computer if applicable) For Remote projects – destination directory in file transfer settings For Custom projects – user-defined variable For other project types – undefined$(SourceDir) For Remote projects – equivalent to $(RemoteSourceDir) For other projects – equivalent to$(LocalSourceDir) $(BuildDir) User-defined directory where build commands are executed.$(TargetPath) Full path to the main binary file of the project (e.g. the EXE file) $(TargetDir) The directory containing the main binary file of the project$(TargetFileName) The name of the main project binary $(TargetExtension) The extension of the main project binary$(DeployPath) Full path of main binary on the deployment machine (cross-compiler projects) $(DeployHost) Host name of the deployment machine (cross-compiler projects) Additionally to that, you can use the following syntax to modify the value of each variable: $(Variable.unixstyle) Convert c:\foo\bar to c/foo/bar $(Variable.forwardslashes) Convert c:\foo\bar to c:/foo/bar$(Variable.nospaces) Replace spaces with underscores $(Variable.defuse) Replace all non-identifier characters with underscores Additionally to the VisualGDB variables, you can use the Windows environment variables (e.g.$(LOCALAPPDATA)\xyz).

You can view the list of variables for a specific project by clicking the link at the bottom of the VisualGDB Project Properties window: