The following procedure describes one way you can debug your .NET scripts using Microsoft Visual Studio .NET.
To debug .NET scripts
Compile your code with debugging information turned on using one of the following methods:
In the Active Solution Configuration list, choose Debug.
Close running instances of Visual Studio that contain your source files.
In this step, you start a new Visual Studio instance to debug the MobiLink server and your .NET synchronization scripts. Start Visual Studio using a command line option to debug the MobiLink server.
For example, run the following command to debug the MobiLink server. Remember to specify mlsrv11 options, including the connection string and the option to load .NET assemblies.
For 32-bit Windows environments:
devenv /debugexe %sqlany11%\bin32\mlsrv11.exe -c ...
For 64-bit Windows environments:
devenv /debugexe %sqlany11%\bin64\mlsrv11.exe -c ...
Visual Studio starts and mlsrv11.exe appears in the Solution Explorer window.
Set up Microsoft Visual Studio for debugging .NET code:
Open the associated .NET source files and set break points.
Note: Open the source files individually in the mlsrv11 solution. Do not open the original solution or project file.
Start MobiLink from the Debug menu or by pressing F5.
If prompted, save mlsrv11.sln.
If the No Symbolic Information window appears, click OK to debug anyway. You are debugging the managed .NET synchronization scripts that MobiLink calls, not the MobiLink server itself.
Perform a synchronization that causes the code with a breakpoint to be executed by MobiLink.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|