开发者

How to debug a database connection in Visual Studio?

开发者 https://www.devze.com 2023-03-10 05:15 出处:网络
Lets say someone gives you code that connects to the database. You are required to find which technology is used to connect to database (ADO, LINQ, etc) and the username and password of the database开

Lets say someone gives you code that connects to the database. You are required to find which technology is used to connect to database (ADO, LINQ, etc) and the username and password of the database开发者_如何学Python user. How about will you debug it, where will you place your breakpoints?


To set a breakpoint, you'll need to find the code and your job will already be done. ;)

I'd start with checking any .config files for database connection information. If that doesn't turn up anything, you don't need to debug the code necessarily. If it is written in any close-to-comprehensible fashion, you'll just need to look through the project structure for the "Model" code. Perhaps do a Find in Visual Studio for using statements like "System.Linq" to find the classes that are using LINQ? Or other connection technologies the developer might have used.

0

精彩评论

暂无评论...
验证码 换一张
取 消