I need to create a modal dialog prompt in extension asking whether the user wants to save data when they close Visual Studio Code. Is there an event in the API fitting this purpose?
There is no event for that, neither any plans to implement it.