Author Topic: Debugging Command Console is Grayed Out  (Read 4583 times)

Offline eaxecx

  • Single posting newcomer
  • *
  • Posts: 6
Debugging Command Console is Grayed Out
« on: May 06, 2018, 12:22:01 pm »
Hi all,

I've got a project where I've built and ran the simple 'Hello world' program in C, just for the purpose of getting my feet wet with GBD degugger.

I'm used to using it in Linux on the command line but now with Code::Blocks installed on Win 7, when I start the debugger, it just plows through to the end, whether I've got break points set or not.

Selecting target:
Debug
Adding source dir: D:\DOCS\CODING\C\C_Blocks\Console_apps\2nd_Try\
Adding source dir: D:\DOCS\CODING\C\C_Blocks\Console_apps\2nd_Try\
Adding file: D:\DOCS\CODING\C\C_Blocks\Console_apps\2nd_Try\bin\Debug\2nd_Try.exe
Changing directory to: D:/DOCS/CODING/C/C_Blocks/Console_apps/2nd_Try/.
Set variable: PATH=.;D:\Program Files (x86)\CodeBlocks\MinGW\bin;D:\Program Files (x86)\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft Network Monitor 3

[debug]Command-line: D:\DOCS\CODING\C\C_Blocks\Console_apps\2nd_Try\bin\Debug\2nd_Try.exe -nx -fullname -quiet  -args D:/DOCS/CODING/C/C_Blocks/Console_apps/2nd_Try/bin/Debug/2nd_Try.exe
[debug]Working dir : D:\DOCS\CODING\C\C_Blocks\Console_apps\2nd_Try

Starting debugger: D:\DOCS\CODING\C\C_Blocks\Console_apps\2nd_Try\bin\Debug\2nd_Try.exe -nx -fullname -quiet  -args D:/DOCS/CODING/C/C_Blocks/Console_apps/2nd_Try/bin/Debug/2nd_Try.exe
done

[debug]Hello world!

Debugger finished with status 0


I was assuming that I could enter 'disassemble main' at the Command console at the bottom but it is grayed out.

I've done searches, read what's *not* to be asked on the forum, as well as the wiki.

Also, I'm kind of wondering if Code::Blocks prefers to be installed on the same drive as the OS, as the GCC complier seems to be the only one available to me and when I click on the 'Files' tab under the blue 'Management' bar, all I'm able to access is drive C (my drive with the OS).

Sorry to bug you guys / keep you from dev ops but I'm frothing at the mouth to see some mnemonics in an IDE!  ;D

Thanks!

EDIT: I'm able to browse D:\ under the 'Files' tab...  (it's nearly 4:00 AM - that's the only excuse I could come up with right now... :D )
« Last Edit: May 06, 2018, 12:42:49 pm by eaxecx »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Debugging Command Console is Grayed Out
« Reply #1 on: May 06, 2018, 12:57:18 pm »
If you post logs you should use the code tags for readability (the # symbol)

Are you using a project? Do you use the debug build (symbols enabled -g)? Enable full debugger logging in the debugger settings and post the full log here.
If you want to view a disassembly you can view it in Debug->debugger windows->disassembly
« Last Edit: May 06, 2018, 01:27:16 pm by BlueHazzard »

Offline eaxecx

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugging Command Console is Grayed Out
« Reply #2 on: May 06, 2018, 10:21:04 pm »
If you post logs you should use the code tags for readability (the # symbol)

Are you using a project? Do you use the debug build (symbols enabled -g)? Enable full debugger logging in the debugger settings and post the full log here.
If you want to view a disassembly you can view it in Debug->debugger windows->disassembly

Thanks for your prompt reply!

Yes, I'm using a project. This morning I've created a new project to do the same thing as before, after adding the -g flag to the compiler settings. (Seems as though I was getting debugging files even without it the first go around)

Build and run, no errors.

Debugger is configured for full debug logs. Tried running, running with break point at main, step into, (with disassemly window open, which promptly disappears after any operation).

The command console at the bottom is still grayed out. I'm assuming this is where I should be able to type commands. As long as it's unavailable, I doubt there will be much disassembly going on...

Logs:
Code
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\
Adding source dir: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\
Adding file: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\bin\Debug\3rd_try_hello.exe
Changing directory to: D:/DOCS/CODING/C/C_Blocks/Console_apps/3rd_try_hello/.
Set variable: PATH=.;D:\Program Files (x86)\CodeBlocks\MinGW\bin;D:\Program Files (x86)\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft Network Monitor 3

[debug]Command-line: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\bin\Debug\3rd_try_hello.exe -nx -fullname -quiet -q -args D:/DOCS/CODING/C/C_Blocks/Console_apps/3rd_try_hello/bin/Debug/3rd_try_hello.exe
[debug]Working dir : D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello

Starting debugger: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\bin\Debug\3rd_try_hello.exe -nx -fullname -quiet -q -args D:/DOCS/CODING/C/C_Blocks/Console_apps/3rd_try_hello/bin/Debug/3rd_try_hello.exe
done

[debug]Hello world!

Debugger finished with status 0
Selecting target:
Debug
Adding source dir: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\
Adding source dir: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\
Adding file: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\bin\Debug\3rd_try_hello.exe
Changing directory to: D:/DOCS/CODING/C/C_Blocks/Console_apps/3rd_try_hello/.
Set variable: PATH=.;D:\Program Files (x86)\CodeBlocks\MinGW\bin;D:\Program Files (x86)\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft Network Monitor 3

[debug]Command-line: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\bin\Debug\3rd_try_hello.exe -nx -fullname -quiet -q -args D:/DOCS/CODING/C/C_Blocks/Console_apps/3rd_try_hello/bin/Debug/3rd_try_hello.exe
[debug]Working dir : D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello

Starting debugger: D:\DOCS\CODING\C\C_Blocks\Console_apps\3rd_try_hello\bin\Debug\3rd_try_hello.exe -nx -fullname -quiet -q -args D:/DOCS/CODING/C/C_Blocks/Console_apps/3rd_try_hello/bin/Debug/3rd_try_hello.exe
done

[debug]Hello world!

Debugger finished with status 0

I supplied the '-q' flag and the debugger further supplied a redundant '-quiet' flag.

Thanks in advance for any help / stern reprisals!


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Debugging Command Console is Grayed Out
« Reply #3 on: May 07, 2018, 01:15:06 am »
Is this really the full debug log?

Are you setting a break point?

can you make a rebuild and post the build log here?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugging Command Console is Grayed Out
« Reply #4 on: May 07, 2018, 01:17:31 am »
1. command line is grayed out when the debugger is running. It will be activated when you stop on a breakpoint, exception or signal.
2. there is a disassembly with and you don't need to type any commands for it see debug -> windows
3. this is not the full debug log
(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 eaxecx

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugging Command Console is Grayed Out
« Reply #5 on: May 07, 2018, 01:51:02 am »
Thanks for all your help.

I noticed that even though I have checked the box "Produce debugging symbols" under Settings ==> Compiler, under Project ==> Build Options, "Produce debugging symbols" is un-checked for the current project.

I'll check that and re-build and see what effect that has.

Thanks again.


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Debugging Command Console is Grayed Out
« Reply #6 on: May 09, 2018, 12:35:43 am »
Quote
I noticed that even though I have checked the box "Produce debugging symbols" under Settings ==> Compiler, under Project ==> Build Options, "Produce debugging symbols" is un-checked for the current project.

This is normal. The global settings are not projected to the project settings. The best way to see if it is build with debug symbols is to look in the build log (not the build messages)