Visual Studio 에서 멀티스레드로 작성된 프로그램을 디버깅 할 때에,

해당 브레이크 포인트 (이하 BP) 에 특정 스레드가 접근할 때에만  활성화 되도록 Filter 를 적용할 수 있습니다.

출처 :  http://msdn.microsoft.com/en-us/library/wyakk529(v=vs.100).aspx


BP를 만든 후 BP 창에서 해당 BP에 마우스 우클릭을 합니다.

우클릭 후 나오는 메뉴에서 Filter 를 선택하면 아래와 같은 창이 나오는데

여기서 Thread ID or Name, Process ID or Name 으로 Filter 를 걸 수 있습니다.

 
이것도 결국엔 bson 이용 방법이 문제인데

정말 bson 이 익숙해지면 mongodb 사용은 거의 끝이 날 것 같네요..

 

void mongo_bson_test_time_t( mongo& m ) 
{
//	> db.foo.find()
//	{ "_id" : ObjectId("4f26266439584a7aa0bfce4e"), 
//	  "time" : ISODate("2012-01-30T05:11:00.594Z") }
//
// time 의 값을 time_t 로 읽어서 출력하기

	mongo_cursor cursor;

	mongo_cursor_init( &cursor, &m, "test.foo" );			// collection 을 test.foo 로 지정

	while( mongo_cursor_next( &cursor ) == MONGO_OK ) 
	{
		bson_iterator iterator;

		// time 필드의 값 읽어오기
		if ( bson_find( &iterator, mongo_cursor_bson( &cursor ), "time" ) )
		{
			time_t t = bson_iterator_time_t( &iterator );

			printf( "time: %s\n", ctime( &t ) );
		}
	}

	mongo_cursor_destroy( &cursor );
}


+ Recent posts