1

I'm trying to debug some internal paths within xcconfig files, and I'd love to be able to echo/print/put the paths to see exactly where they're pointing.

Googling "What language is xcconfig?" doesn't give much besides that it's a text file (aren't they all?)

It's looks bash-ish, but echo doesn't work, neither does put or print or println.

Thanks for the help!

h.and.h
  • 690
  • 1
  • 8
  • 26

1 Answers1

1

You can see all environment and custom variables in any 'Run script' under 'Build Phases'.

  1. YourConfig.xcconfig:
MY_VALUE = 11.0
  1. Then add 'Run Script' with 'Show environment variables in build log':

enter image description here

  1. Build and look at your logs under 'Report Navigator':

enter image description here

  1. Expand the log to see all variables:

enter image description here

iUrii
  • 11,742
  • 1
  • 33
  • 48
  • Addendum: if you've got multiple targets, make sure to add the run script to the target you're debugging. The env variables can change depending on wiring differences between targets. – h.and.h Aug 15 '23 at 18:42