2.1.1之前可能需要安装boost等相关库,但2.1.1之后就自带了,不用安装相关的库
1、安装vs2010
2、下载源码,进入到mongodb的源码目录下mongodb-src-r2.2.0\src\mongo\db
3、打开db_10.sln

4、修改编译版本为win32 debug版,如果是64位机请选择x64,我的服务器是32位的,所以如下图


5、修改编译参数
右键mongod功能,选择properties

在debug选项中增加如下启动命令

6、按F5开始调试
(时间较长)