title: Visual Studio - Debugger Breakpoints Move and no longer hit the lines they are supposed to
body: <p>Currently I'm seeing an oddity in functions in one of my programs in visual studio is acting. VS allows me to put break points at certain points in the file, but then in debug mode it moves these break points to spaces and comments.</p>
  
  <p>Things I've already tried:</p>
  
  <ol>
  <li>Deleted the PDB file and rebuilt.</li>
  <li>Deleted the EXE file and rebuilt.</li>
  <li>Rebuilt the whole project. (Clean, Rebuild)</li>
  <li>Checked that Optimization is off.</li>
  <li>Checked that the debug path is the same as the build output path.</li>
  <li>"Require source files to exactly match the original version" flag is checked.</li>
  </ol>
  
  <p>In case there is simply something odd with my code causing this here is the function it happens in:</p>
  
  <pre><code>bool BManager::Record(string _strFile)
  {
     bool bSuccess = false;
     CBitmap * bitmap = new CBitmap();
     HBITMAP  handle = NULL;
     HPALETTE hPalette = NULL;
     //LoadBitmapFromBMPFile( (LPTSTR)_strFile.c_str(), &amp;handle, &amp;hPalette);
     ofstream out;
     out.open(_strFile.c_str());
  
     handle = (HBITMAP)LoadImage(NULL, (LPTSTR)_strFile.c_str(), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_DEFAULTSIZE | LR_LOADFROMFILE);
  
     bitmap-&gt;FromHandle(handle);
     bSuccess = ImageBitmap_Record(bitmap);
     delete bitmap;
     bitmap = NULL;
     CloseHandle(handle);
     return bSuccess;
  }
  </code></pre>
  
  <p>Any thoughts?</p>