xctrace --launch gets confused by program arguments with dashes

I have a command-line program "foo --input bar". I am trying to profile it using

xctrace record --output ~/Downloads/prof2 --template "Time Profiler" --time-limit 100s --launch ./foo --input bar

It gets confused by the dashes in "--input" Command Parser error occured: unrecognized option '--input'

Do I need some escape sequence for the dashes?

Never mind, chatgpt gave me the answer :-). I need to use --launch -- ./foo etc

xctrace --launch gets confused by program arguments with dashes
 
 
Q