Using Visual Studio 2010 IDE来调试firefox源码
来源:互联网 发布:飞利浦淘宝是真的吗 编辑:程序博客网 时间:2024/05/19 20:41
Setting up the build is somewhat straight forward on windows however I could not find any instructions on setting up a Visual Studio project for editing and debugging. I’m writing down the instructions I was given on IRC for my future benefits and for others. I hope at some point someone will take the initiative to put this information on MDN.
These instructions start from the point where you have a simple build of Firefox completed with the latest windows SDK and VS 10.
- Create a new project using ‘Project from Existing Code’ (See Joe Walker’s comment if you don’t have this).
- Select ‘Visual C++’, enter a project name (ex: mozilla-central), source directory as project file location, select ‘Show all files in Solution Explorer’.
- Make sure you un-select ‘Add Files to the project from these folders’, hit Next.
- Select ‘Use external build system’, hit Finish.
- Project will be empty until you select ‘Show all Files’ from the solution explorer, File -> close the solution, re-open it. Source files should appear (I had to do this step 3 times)
- For autocomplete select Project ->Properties -> NMake.
- Under ‘Preprocessor Definitions’ add XP_WIN (return here later to add any definition your may be compiling with/find missing)
- Under ‘Include Search Path’ type in ‘<objdir>\dist\include’ (I recommend to have built your project from command line for this step)
- For debugging select ‘Debugging’ still under the property page, type in the absolute path to firefox.exe. Recommended command argument ‘-P “Minefield” -no-remote’.
I strongly recommend using ‘Console’ when working from the command line.
Optional: Add a build/clean target (Can otherwise be done outside of Visual Studio using the command line)
- Create a single script, build.sh, that you can invoke that will trigger a build with the configuration you need. It should set all environment variables needed.
- Copy the ‘mozilla-build/start-msvc10.bat’ to ‘mozilla-build/start-msvc10-build.bat’.
- Replace the last line to read something like ‘”%MOZILLABUILD%”\msys\bin\bash –login <path-to-your-build-script>/build.sh’.
- Select Project->Properties->NMake, for Build Command Line type ‘C:\mozilla-build\start-msvc10-build.bat’.
- Advanced: Create multiple project configuration for each mozconfig build configuration you would like to work with then have them invoke specific build scripts and firefox.exe.
You can modify your script to do incremental builds to reduce your turn around time.
http://benoitgirard.wordpress.com/2011/05/27/using-visual-studio-2010-ide/
- Using Visual Studio 2010 IDE来调试firefox源码
- Visual Studio + UnrealScrip IDE调试
- Visual Studio 调试 silverlight Firefox
- 【IDE-Visual Studio】vs2010 调试dll
- 配置Visual Studio 2008来调试.NET Framework源码的基本步骤
- Visual Studio 2010下编译调试MongoDB源码
- visual studio 2008调试.net 源码
- 【转】配置Visual Studio调试FrameWork源码
- [原创]Visual studio .net IDE+ cvs源码管理攻略
- 【Visual Studio】 IDE Notes
- Visual Studio 2010远程调试
- Visual Studio 2010调试技巧
- For CImage Library using visual studio 2010
- Visual Studio通过配置IP端口来进行局域网调试
- Visual Studio IDE 快捷键一览
- Visual Studio IDE 技巧(快捷键)
- visual studio 2003 IDE 几个问题
- Visual Studio IDE 常用功能
- 反射实践(assembly reflection attribute)
- C#开源资源大汇总
- Delphi 移除U盘的两种方法
- mysql语句用法,添加、修改、删除字段
- 黑马程序员_交通灯管理系统
- Using Visual Studio 2010 IDE来调试firefox源码
- cg
- mysql配置之my.ini详解
- my.ini 示例
- [sig12][beyond programmable shading]others
- android面试题总结加强再加强版(四) .
- 黑马程序员_银行业务调度系统
- Socket之shutdown()用法
- Activity中如何获取strings.xml中的资源