Originally, we integrated the LINQ to SQL visual debugging tool in Visual Studio 2008 beta2, but now we are "normal" to find that the promise of MS has been postponed again-after beta2 was released, the LINQ to SQL visual debugging tool was released separately, and scottgu also introduced it on its blog (LINQ to SQL debug visualizer), which is a simple translation.
You must download ~~, Download
The downloaded file contains the. dll file of a visual debugging tool.ProgramSet (in the bin \ debug folder), and also containsSource code! It's a small compensation :)
Installation Steps
1. Disable all the running Visual Studio 2008.
2. Copy the sqlserverqueryvisualizer. dll assembly to the local \ Program Files \ Microsoft Visual Studio 9.0 \ common7 \ packages \ debugger \ visualizers directory:
3. OK. Run Visual Studio 2008 again. Now you can use the LINQ to SQL visual debugger.
Usage
Set breakpoints and run debugging. After the query expression is assigned a value, use the debugger to view the product variable:
Click the small magnifier icon on the expression to run the LINQ to SQL visual debugging tool to view the actually executed SQL statements automatically generated based on the LINQ query:
Click "execute" to view the actual original records returned from the database:
Enjoy it!