开发者

How to debug a database connection in Visual Studio?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜