VS Tips (Advance part)

來源:互聯網
上載者:User

1. Rename feacp.dll to disable intellisense. You will find this file in Program files: ...."Microsoft Visual Studio 8"VC"vcpackages folder.

2. If you are still experiencing slowdowns due to .ncb file generation, try deleting the .ncb file for any solution you use, create an empty file with the same name and write protect it in both your solution directory and your %TEMP% directory. (you get some nag dialogs when you open the solution, you can ignore them. The nags may be more annoying than the residual .ncb overhead, so only implement this tip if absolutely necessary)

3. Use your own solution with a minimum number of projects whenever possible. Keep in mind however that if you introduce a change in project dependencies you should make sure you update the official solution. If you add a dependency from project A to project B in your solution, the IDE will automatically include B.lib when linking A, even if you didn’t add the B.lib to the linker inputs for A. This can lead to a broken build when your changes are submitted. 

4. Under Tools->Options->Projects and Solutions->VC++ Project Settings, change "Build Timing" to Yes. (You'll get a better feel for how long non-IncrediBuild compilation and linking can take.)

5. Under Tools->Options->Debugging->Native check “Load DLL exports”. You will get better callstacks.

6. Use optdebug.bat to move as many PDB files as possible to a subdirectory, demand load them from the debugger when you need them. you should also customize it to restore the PDB files for the modules you work on back to the lib"debug directory.
Sample: optdebug.bat
md X:\...\pdbs
move X:\...\Aaa.pdb X:\...\pdbs
Under Tools->Options->Debugging->Symbols add the folder where you moved the PDBs using the batch file in the above step. Check the option to “Search the above locations only when symbols are loaded manually” or else moving the PDBs won’t make any difference since they will always be loaded. Also add a debug location for http://msdl.microsoft.com/download/symbols , and UNCHECK it immediately. When you get into a situation where you need the callstack for some Microsoft code, check this box, start Inventor in the debugger, and walk away for a half hour while it downloads the symbols for the OS. You should uncheck this again when you want to do normal debugging. You should supply a local directory to store the downloaded symbols.

7. You can improve debugging startup time by editing the “hosts” file under C:"WINDOWS"system32"drivers"etc and adding the entries “127.0.0.1 daddev” and “127.0.0.1 offlab”. This will prevent a network timeout when the IDE tries to local the symbols for certain dlls such as MSO.dll. You need to reboot after changing the hosts file for the changes to take effect. 

8. Avoid stepping into certain functions that you will never need to debug (for example the overloaded new operator) by setting up the “StepOut” registry entries. Restart the IDE for this to take effect.
[Sample: StepOut.reg]
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\NativeDE\StepOver]
"CString StepOut"="CString.\\:\\:.*=NoStepInto"

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.