Debugging a .NET user interface extension |
The basic steps involved in debugging a user interface extension include:
To configure a Visual Studio project for debugging:
If you are debugging an extension in a 64-bit application:
Add the following command line:
"%SystemRoot%\Microsoft.NET\Framework64\FrameworkVersion\RegAsm.exe" "$ (TargetPath)" /codebase /tlbNote |
---|
You may need to run Visual Studio as an administrator to be allowed to register the .NET assembly for COM interoperability. |
When you run the project next in debug mode, Visual Studio will automatically start the PowerUser.
Note |
---|
If you specified the PowerUser executable (or another unmanaged application) as an external program to start for debugging a user interface extension, then debugging in Visual Studio 2010 using F5 may not stop execution at breakpoints that you have set. The debugger will launch and code will run, but breakpoint indicators will appear hollow and a message will appear that says “No symbols have been loaded for this document”. The problem is that the debugger has loaded the wrong Common Language Run-time version; 4.0 is loaded instead of 2.0. To resolve the issue, create a file named PowerUser.exe.config that contains the following where FrameworkVersion is the installed version of the .NET Framework: PowerUser.exe.config fragment <?xml version ="1.0"?> <configuration> <startup> <supportedRuntime version="<replaceable xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">FrameworkVersion</replaceable>" /> </startup> </configuration> Place the file in the same location as the PowerUser executable (by default, C:\Program Files\BC-Meridian\Program). This workaround is only required for debugging and should not be applied on development computers. For additional information, see the following resources. |