简体   繁体   中英

How Can I debug a CLR trigger from SQL Server 2012

I have installed the SSDT to connect to a sql server 2012 instance and Id like to know how can I debug a CLR trigger from the database, I have created a database project to create the clr trigger and I can make a deploy to that database.

the problem is because I don't have the option of adding any "test script" like previous verions I don't know how can I debug from there,

thanks.

  • In Solution Explorer, add "Script (Not in build)" to the project and put your test TSQL there
  • In the project properties, under Debug, choose "Startup Script" and select the new script file in the dropdown

Aside from the usual SQLCLR setup, make sure you right click the database in the SQL Server Object Explorer and enable "Allow SQL/CLR Debugging".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM