1
votes

How do I debug an assembly that's being used by a Report Services report running through SQL Server 2008 R2 Reporting Services?

  • I'm trying to debug using VS2012
  • It looks like the reports were created in VS2008 (VS9)
  • The assembly is targeted to .NET 3.5
  • I'm developing on my own dev machine and want to debug on this
  • One of the expressions in my report calls a method in a custom .dll
  • I've built the dll in debug mode, and deployed it, plus the .pdb file, to the default location (in my case, C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies)
  • I'm setting the breakpoint in VS2012 for the assembly code, which is contained in a distinct project
  • I run up the report in Firefox, then attach to the ReportingServicesService.exe process
  • I carry out some actions in the report that should trigger the code
  • The breakpoint isn't hit

Is there anything else I need to do to debug?

1
"•I run up the report in Firefox," - tried IE? - Mitch Wheat
Thanks Mitch - I've answered my own question now, however that's possibly an important point if you're using the report viewer that's usually available at localhost/ReportServer_SQL2008. In my case I was originally running up an .aspx page that has the report embedded as a control, so it should be triggering the report server anyway. - Chris Halcrow

1 Answers

1
votes

Got it. Here's what else I needed to do:

  • Open the report solution in VS2008
  • Open the custom assembly project in VS2012
  • Attach to process from VS2012, but attach to devenv.exe for the VS2008 instance
  • Click the report 'preview' tab in VS2008 - this runs the report, which is now hooked up to the VS2012 debugger :)

Here's some MSFT documentation on this (doesn't strictly relate to SQL Server 2008 R2):

http://msdn.microsoft.com/en-us/library/ms153693.aspx