Author Topic: Is there a C::B command line option support loading a specific plugin  (Read 7907 times)

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I'm debugging C::B in C::B, but it seems by default, it will cause several seconds( more than 30 second ) to let the gdb.exe load the debugee.

I suspect there are too many plugins(compiler, debugger, astyle....)

I found that there is an option to "Disable the whole plugin" command line option, but that not my choice.
I would like to only load one plugin such as "Code Completion plugin".

Can someone help me? thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Is there a C::B command line option support loading a specific plugin
« Reply #1 on: December 27, 2009, 12:36:54 pm »
Can someone help me? thanks.
You have several options, pick one:
- Disable all plugins other that CC via the settings. This is persistent accross C::B sessions.
- Simply move all non-required libs out of the plugins folder (a batch file / script can handle that easily) and start C::B.
- Start C::B in safe mode (which disables all plugins) and load the plugins needed as desired.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Is there a C::B command line option support loading a specific plugin
« Reply #2 on: December 27, 2009, 12:51:00 pm »
- Disable all plugins other that CC via the settings. This is persistent accross C::B sessions.
thanks, I have choose this one, because, the debugger C::B is a portable version, so, only the debugee C::B has the persistent settings.
 :D

By the way, to debug CC plugin, one need to at least enable compiler plugin, if not, it is really hard to let the parser following the include files.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

mariocup

  • Guest
Re: Is there a C::B command line option support loading a specific plugin
« Reply #3 on: December 27, 2009, 01:00:55 pm »
Hi ollydbg,

if you invoke C::B the default personality will be used (default.conf) (see right corner of status bar in C::B). If you start C::B with the option -p=<profile_name> then CB stores all settings in <profile_name>.conf. You can configure this profile to disable all unnecessary plugins and store the settings in this profile.
You can even use CB option -p=ask to get a dialog to switch between different profiles.  (See chapter Personalities in http://www.codeblocks.org/docs/main_codeblocks_en.html).

I prefer this solution since it has no persistent effect and it can be used to switch between different configurations easily.


Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Is there a C::B command line option support loading a specific plugin
« Reply #4 on: December 29, 2009, 02:48:34 am »
Hi ollydbg,

if you invoke C::B the default personality will be used (default.conf) (see right corner of status bar in C::B). If you start C::B with the option -p=<profile_name> then CB stores all settings in <profile_name>.conf. You can configure this profile to disable all unnecessary plugins and store the settings in this profile.
You can even use CB option -p=ask to get a dialog to switch between different profiles.  (See chapter Personalities in http://www.codeblocks.org/docs/main_codeblocks_en.html).

I prefer this solution since it has no persistent effect and it can be used to switch between different configurations easily.



Thanks, ,this is a really good alternative.
By the way CodeBlocks at the command line, I can't find any text about about "-p=ask", so, this option can be added in the next release of Manual. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

mariocup

  • Guest
Re: Is there a C::B command line option support loading a specific plugin
« Reply #5 on: December 29, 2009, 11:30:10 am »
Hi,

the manual contains already the info. The option -p is the short option for --personality.

Code
1.10.3  Personalities
....
If you start CodeBlocks from the command line with the additional parameter --personality=ask, a selection box will be displayed for all the available profiles.