Indeed, limiting C# Script Tasks to language features of C# 4.0 brings the Debugger back to life. In my case, adding a single null-coalescing operator caused the debugger issue using Visual Studio 2015 (VSTA) on SQL Server/SSIS 2016.
To restrict the Script to C# 4.0 we can enforce a specific Language Level in the Build settings of the Task:
- Open the Script Task in question, click the “Edit Script…” button to open Visual Studio (VSTA).
- In the Solution Explorer right-click the Project node and select Properties
- In the Project window, go the Build tab, scroll down and click the Advanced.. button.
- In the Advanced Build Settings window change the Langauge Version from “default” to “C# 4.0“.
- Clean/Rebuild the Script Task, fix compilation errors.
- Finally, exit VSTA, rebuild the project
and then you should be able to debug the C# Script Task again.