Select the Save window in file choice to save the Local Variables window contents in a file. You can choose the file name by selecting Options -> Debugger settings -> Monitor properties from the Debug Session Control window or any of the source windows and filling in the Save File entry field.