Make sure to compile your project using the Debug option from the Configuration options.
When generating a new Pattern make sure to enable the Debugging options for Patterns.
Set the project as the Startup one in Visual Studio and configure the GeneXus.exe complete path in the Project -> Properties -> Debug -> Start action -> Start external program.
