I wanted to output the variables used by the Jmeter thread when a sampler executed. I have already setup jmeter to output an excel file (see here) . To do this I needed to change the jmeter.properties file to append the list of jmeter variables I wanted outputted. An example is shown below for the three variables pLicense,pName,pPostcode,pNumber
# Optional list of JMeter variable names whose values are to be saved in the result data files.
# Use commas to separate the names. For example: