Author Topic: Feature Request: Enable debugger to work without having to create a Project fir  (Read 7047 times)

Offline maelstrom

  • Single posting newcomer
  • *
  • Posts: 3
Hello,

I discovered CodeBlocks after my old and trusty turbo c refused to work on my Windows 7 64-bit machines, and i needed an alternate for practicing data structures and algorithms programs for my courses.  I must say I have been impressed by the amount of functionality that has been developed in this IDE,  and how the developers are putting so much work into it and yet have kept it free and open-source.  

Having said that, there is one minor issue that I have encountered in my use.  Students like me, who are using CodeBlocks to learn C and C++ programming, and for implementing data structures and algorithms code,  it is actually not helpful or productive to create a separate project for each small toy program you write.  Infact, most people who are using CodeBlocks for such educational purposes would write their code in standalone c/c++ files with a separate main() function in each file, which isn't possible if you've put your files in a project.  All you want is a way to write, compile, run and debug your code in a c/cpp file.  Unfortunately, while CodeBlocks has an incredible debugger frontend, you cannot use the debugger unless you have created a project.  

So i'd like to submit a feature request:  Please enable the debugger to be used with standalone c/cpp files.  This will make CodeBlocks much more appealing to c.s. students.

EDIT:
on a further note, please also consider bundling the syntax highlighting themes with the CodeBlocks installer, which are currently available on the codeblocks wiki and have to be manually installed.

Thanks!
« Last Edit: July 30, 2014, 06:07:59 pm by maelstrom »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
So i'd like to submit a feature request:  Please enable the debugger to be used with standalone c/cpp files.  This will make CodeBlocks much more appealing to c.s. students.
Often requested feature, but not too useful one to inspire anyone to implement it... patches welcome...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
You can also use one target per file, collected in one project... it would be relatively (at least i think) easy to write a script, to create a target per file...

Offline scuttsie

  • Single posting newcomer
  • *
  • Posts: 2
So i'd like to submit a feature request:  Please enable the debugger to be used with standalone c/cpp files.  This will make CodeBlocks much more appealing to c.s. students.
Often requested feature, but not too useful one to inspire anyone to implement it... patches welcome...

Doesn't "Often requested feature" tell you guys something? It is often requested because it is a "feature" that should have been provided from day one. But because of your original arrogance you have painted yourselves into a corner - the festival of arrogance continues ...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Sorry, but we are not obliged to add features we're not interested in. We're all volunteers and work on C::B for fun.
Also all developers of C::B work on it in order to improve their own workflows.
The requested one is not a workflow used in serious productions, so it is less interesting...

As I've said - patches are welcome...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scuttsie

  • Single posting newcomer
  • *
  • Posts: 2
Sorry, but we are not obliged to add features we're not interested in. We're all volunteers and work on C::B for fun.
Also all developers of C::B work on it in order to improve their own workflows.
The requested one is not a workflow used in serious productions, so it is less interesting...

As I've said - patches are welcome...
Thank you for your response.
I understand that the platform has been/is developed by volunteers and I applaud your efforts but with this issue, IMO, it is more about professionalism or how the platform is perceived or meets performance expectations.
I would like to make the following suggestions, both to be controlled by switch options within the C(++) source code;
1. Binary numeric values to be stored using the high order bit to indicate sign, '1' zero and positive values and '0' negative values. For example, single byte numeric, -127 = hex(00), -1 = hex(7F), 0 = hex(80), 1 = hex(81), 128 = hex(FF) and for two byte numeric in big endian format, -32767 = hex(0000), -1 = hex(7FFF), 0 = hex(8000), 1 = hex(8001), 32768 = hex(FFFF) etc. The reason for suggesting this format option for handling the storage of binary numeric values means that negative values logically will always be less than zero, which, in turn, will always be less than positive values. Also, single byte logical expressions will work irrespective of being defined as either character or binary numeric.
2. Floating point numeric option to store values in binary coded decimal format. The reason for BCD storage option is so that using the logical expressions of comparison with zero will always work (using the approximation method they necessarily/generally don't).
I await your response.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re:
« Reply #6 on: August 01, 2014, 05:34:12 am »
I am not sure if the author is aware of the concept of targets. Once you have a project it can have 1..n targets representing an executable based on a single or more files each. As you can make easily copies of targets setting up another target is just a few clicks and fulfils everything you need for debugging.
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

Offline maelstrom

  • Single posting newcomer
  • *
  • Posts: 3
thank you for all the responses..

So i'd like to submit a feature request:  Please enable the debugger to be used with standalone c/cpp files.  This will make CodeBlocks much more appealing to c.s. students.
Often requested feature, but not too useful one to inspire anyone to implement it... patches welcome...


I realize that most people who would find this feature useful are beginner programmers.  Still, as you pointed out, it is an often requested feature, which is probably due to the popularity of CodeBlocks among beginners.  I have no idea of the complexity of effort that would be required, but I do hope that it gets implemented soon, because it is like the only gripe i have with CodeBlocks.  For the time being, however, I've switched to Orwell Dev-CPP, which does allow debugging of standalone c/cpp files.

You can also use one target per file, collected in one project... it would be relatively (at least i think) easy to write a script, to create a target per file...


I dont know about scripting, wouldn't that defeat the purpose one is trying to achieve, i mean to be able to quickly and easily write, compile and debug small, single-file programs.. But I would like to learn how that can be done..

I am not sure if the author is aware of the concept of targets. Once you have a project it can have 1..n targets representing an executable based on a single or more files each. As you can make easily copies of targets setting up another target is just a few clicks and fulfils everything you need for debugging.

Unfortunately, no idea.  I'll try to look for it in the manual and the wiki.  Any pointers would be appreciated.
« Last Edit: August 02, 2014, 09:36:19 am by maelstrom »