Difference between revisions of "Developer documentation"

From Code::Blocks
m (Some mirrors were dead)
(→‎Debugging C::B: distribute separate debug files)
 
(7 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/
 
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/
 
* Subversion URL: <nowiki>svn://svn.code.sf.net/p/codeblocks/code/trunk</nowiki> or <nowiki>http://svn.code.sf.net/p/codeblocks/code/trunk</nowiki>
 
* Subversion URL: <nowiki>svn://svn.code.sf.net/p/codeblocks/code/trunk</nowiki> or <nowiki>http://svn.code.sf.net/p/codeblocks/code/trunk</nowiki>
 +
 +
'''Mirror by Carsten Arnholm''' (Read-only; )
 +
* Web-interface: https://github.com/arnholm/codeblocks_sfmirror
 +
* Git URL: see the above page.
  
 
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)
 
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)
Line 36: Line 40:
 
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''
 
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''
 
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''
 
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''
:See also [/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]
+
:See also [https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]
  
 
* '''[[Coding style]]'''
 
* '''[[Coding style]]'''
Line 92: Line 96:
  
 
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].
 
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].
 +
 +
It's possible to build Code::Blocks through GitHub Actions, see [https://wiki.codeblocks.org/index.php/Building_Code::Blocks_through_GitHub_Actions Building Code::Blocks through GitHub Actions].
  
 
== Debugging C::B ==
 
== Debugging C::B ==
  
 
* When C::B crashes, it will generate a call-stack file "codeblocks.RPT", at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.
 
* When C::B crashes, it will generate a call-stack file "codeblocks.RPT", at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]
+
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]. You can use the project option plugin to change all the custom variable WX_SUFFIX from "u" to "ud" in the workspace, so that you can build C::B against wx debug library, see discussion here: [https://forums.codeblocks.org/index.php/topic,25959.0.html How to globally set the "custom variables" in the cbp files under a workspace].
 +
* to accelerate the debugging process for many plugins(when GDB load a lot of plugins with debug information, it will be slow), there is a special profile named "debug-plugin", a profile file is just a configure file named "debug-plugin.conf", when you start with this profile, you can exclude other plugins, and only load the plugins you needed, see discussion here: [https://forums.codeblocks.org/index.php/topic,25161.0.html How to exclude the other plugins when debugging]
 +
* if you application or the debugee C::B is built against release version of wxWidgets library, how to debug the wxWidgets symbols, the method is to use the gcc's option "-femit-class-debug-always", see forum discussion here: [https://forums.codeblocks.org/index.php/topic,25731.0.html How to add gcc option "-femit-class-debug-always" to a single cpp file in cbp]
 +
* to catch more debug information on the crash, we can distribute separate debug files, see discussion here: [https://forums.codeblocks.org/index.php/topic,25712.0.html new idea: ship the debug symbols in a separate file when we distribute C::B]

Latest revision as of 09:26, 12 February 2025

Official Code repository Subversion

Mirror by Carsten Arnholm (Read-only; )

Mirror by biplab (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)

Mirror by Jens (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)

Mirror by Obf (Read-only; refreshed manually. As 2022-09-12, it looks dead.)


Articles for Code::Blocks developers.

  • Documentation
User's manual in various formats and languages.
Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.
  • Compile the complete Code::Blocks from sources on Windows and Linux
Code::Blocks uses Launchpad to coordinate translation efforts.
See also Code::Blocks' translation
The source code formatting style used in the Code::Blocks' source.
How to add support for new syntax lighting schemes.
Creating a diff file and then submitting it to the patch tracker.
Information about unicode standards and how unicode is handled in Code::Blocks' source code.
List of various development tips for Code::Blocks.
Information about scripting Code::Blocks with Squirrel.
Information about the architecture of Code::Blocks.
Information about the Code::Blocks SDK events and how to work with them.
Description of the format of each file Code::Blocks produces.
Tips and trick for working with our version control system.

Plug-In development

Scripting

Using scripting to extend Code::Blocks' functionality

Developing C::B with Git

For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See Re: Read-only Git, SVN Repo for Code::Blocks, also stahta01 has a nice instruction about how to use git, see Development How to use a Code::Blocks Git Repo.

If you want to create a SVN style patch from git, see: This forum post.

It's possible to build Code::Blocks through GitHub Actions, see Building Code::Blocks through GitHub Actions.

Debugging C::B

  • When C::B crashes, it will generate a call-stack file "codeblocks.RPT", at the crash point (see this for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the Debugging made easier, this is an address2line UI interface that works under Windows.
  • You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: patch to build C::B against wx debug library. You can use the project option plugin to change all the custom variable WX_SUFFIX from "u" to "ud" in the workspace, so that you can build C::B against wx debug library, see discussion here: How to globally set the "custom variables" in the cbp files under a workspace.
  • to accelerate the debugging process for many plugins(when GDB load a lot of plugins with debug information, it will be slow), there is a special profile named "debug-plugin", a profile file is just a configure file named "debug-plugin.conf", when you start with this profile, you can exclude other plugins, and only load the plugins you needed, see discussion here: How to exclude the other plugins when debugging
  • if you application or the debugee C::B is built against release version of wxWidgets library, how to debug the wxWidgets symbols, the method is to use the gcc's option "-femit-class-debug-always", see forum discussion here: How to add gcc option "-femit-class-debug-always" to a single cpp file in cbp
  • to catch more debug information on the crash, we can distribute separate debug files, see discussion here: new idea: ship the debug symbols in a separate file when we distribute C::B