When you run C code in Visual Studio Code (on Linux) and stop debugging, the atexit() function is not called.
I can understand that the stop (square red button) in VS Code is similar to kill command so no further code allowed to run.
SigHandler function is not called either, see my older (not answered) question : How to catch CTRL+C inside C Program on VS Code on Linux?
So my question is "How can I accomplish to run code (clean-up, close-up, etc.) after the debugging is ended or program-run-finished manually?