Author Topic: Code::blocks 16 remember debugging console window size (solved)  (Read 229 times)

Offline Cool Javelin

  • Multiple posting newcomer
  • *
  • Posts: 10
Code::blocks 16 remember debugging console window size (solved)
« on: November 08, 2018, 01:00:19 am »
Win7 (SP1) 32 bit. Code::Blocks 16.01.

I am debugging a C project, and when I launch the debugger (red 'play' arrow), I get a console window with my program running.

I was able to right click on the title bar, select properties and change the font and font size, and it remembers that for the next launch.

However, the size of the window does not seem to be remembering.

I can drag the bottom of the window to make it bigger, but next time it has forgotten that.

I have changed the setting "let system position window" and that seems to work as expected. If I check that, the window comes up where it likes, if I uncheck that, it comes up where I past placed it. But always the size of the win is smaller then I want.

How can I also get it to remember the size of the window.

Thanks, Mark.
« Last Edit: November 10, 2018, 11:32:08 pm by Cool Javelin »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11200
    • Travis build status
Re: Code::blocks 16 remember debugging console window size
« Reply #1 on: November 08, 2018, 08:32:35 am »
There are options to control the default size. Set them and it should work.
They are in the cmd.exe settintgs. C::B has nothing to do with this.
(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 Cool Javelin

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Code::blocks 16 remember debugging console window size
« Reply #2 on: November 09, 2018, 07:45:50 pm »
Thanks oBFusCATed:

OK, So I infer from "C::B has nothing to do with this" that it is a window setting.

When I run my C console program directly from Windows, the position and size are as I desire them.

However, when I launch the debugger the size is incorrect, so C::B is doing something different.

I just noticed, when I run the program using the GREEN play button, the window is as I desire it. Only when I launch using the RED play button is it not correct. So it is the launching of the debugger that is the issue. This probably makes the following paragraph moot.

In C::B under Settings->Environment, the "Shell to run commands in" is greyed out (It currently reads "/bin/sh -c" but I cannot change it, I assume it is because I am on a Windows environment.)
Also, below, the "terminal to launch console programs is equally inaccessible.
Would this be where to change those settings? How do I enable them.

Can you please help me to track this down?

Thanks, Mark.
« Last Edit: November 09, 2018, 07:58:08 pm by Cool Javelin »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6359
    • My Best Post
Re: Code::blocks 16 remember debugging console window size
« Reply #3 on: November 09, 2018, 08:30:16 pm »
There are options to control the default size. Set them and it should work.
They are in the cmd.exe settintgs. C::B has nothing to do with this.

@Cool Javelin: TRY TO CHANGE THE WINDOWS SETTINGS!

Edit: Took me 4 tries to find a good link.
https://www.winhelponline.com/blog/set-cmd-prompt-default-window-size-position/
Note: Windows can remember the settings for each way it is called. So, it should be possible to set the debugger called cmd.exe separately. But, since, I use the debugger very rarely I have no idea if this is true.

Tim S.
« Last Edit: November 09, 2018, 11:02:59 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Cool Javelin

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Code::blocks 16 remember debugging console window size
« Reply #4 on: November 10, 2018, 11:30:20 pm »
Tim S:

THANK YOU SO MUCH for that link. It is the magic cookie.

I have tried to use the properties for the debugger console window, but it never remembered.

I have been struggling with this for years now, and that link describes the difference between "proprieties" and "defaults." I never noticed "defaults" before.

Too bad C::B doesn't use a shortcut link to launch it's console windows.
Then we could set "properties" for each link.
It seems like it would be easy enough to put a shortcut in the project folder to launch cmd.exe.

That way I can have 2 (or 3) C::B projects open and have each of them use their own settings for the debugger (red play button) AND run without the debugger (green button) such that I can run each project simultaneously and have each console open on a different monitor.

Maybe a future version of C::B will implement that feature.

Anyway, you are a life saver, this will help in other areas using Windows too.

Thanks again, Mark.