Page 1 of 1

Using "Pause when execution ends" checkbox

Posted: Sun Feb 27, 2011 10:55 pm
by paulkinzelman
I'm using CL 2.9.0.4684, VistaSP2 and doing a console app with a DLL project as well.

When I run it with no breakpoints, it'd be nice to pause the termination at the end so I can see what's on the console before the console window is deleted. I have to put a breakpoint at the final return at the end of the main routine to be able to see this.

Under Project Settings | Common Settings | General
there's a box "Pause when execution ends" which sounds like it should do this, but when I check it, there's no change, the execution doesn't pause at the end before the console window is deleted.

I looked in the .project file and found the line:
<General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="0 1 0 -10 29.92 1000 15000 5 0 0 0 0 2000 0" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
which sounds like the checkbox is checked and it ought to pause.

I noticed another thread concerning pausing talking about hard-drive D: as if that has something to do with it. In my case, however, everything is on drive C:

Re: Using "Pause when execution ends" checkbox

Posted: Tue Mar 01, 2011 1:35 pm
by eranif
paulkinzelman wrote:there's a box "Pause when execution ends" which sounds like it should do this, but when I check it, there's no change, the execution doesn't pause at the end before the console window is deleted.
You are correct, this is exactly what this checkbox should do.

Can you paste here the output from the 'Ouptut' window?

Eran

Re: Using "Pause when execution ends" checkbox

Posted: Wed Mar 02, 2011 12:54 am
by paulkinzelman
[I checked to make sure, and that checkbox is checked.
Also I have two independent workspaces, my tiny test environment, and my real program, and they both work the same way with respect to not pausing with that box checked so I doubt corruption of my workspace.
I'd also be happy to post my small DLL test environment if you'd like.]
Using gdbinit file: C:\Users\paulkinz\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\apk\adev\testdll
Launching gdb from : ./Debug
Starting debugger : gdb --command="C:\Users\paulkinz\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./docmd"
DEBUG>>set new-console on
DEBUG>>set unwindonsignal on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print pretty on
DEBUG>>set print elements 200
Debug session started successfully!
DEBUG>>00000001-exec-arguments
DEBUG>>00000002-exec-run
DEBUG>>~"GNU gdb (GDB) 7.0\n"
GNU gdb (GDB) 7.0
DEBUG>>~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
Copyright (C) 2009 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
DEBUG>>~"This is free software: you are free to change and redistribute it.\n"
This is free software: you are free to change and redistribute it.
DEBUG>>~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
DEBUG>>~"and \"show warranty\" for details.\n"
and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"mingw32\".\n"
This GDB was configured as "mingw32".
DEBUG>>~"For bug reporting instructions, please see:\n"
For bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>~"Reading symbols from C:\\apk\\adev\\testdll\\Debug/./docmd.exe..."
Reading symbols from C:\apk\adev\testdll\Debug/./docmd.exe...
DEBUG>>~"done.\n"
done.
DEBUG>>&"set new-console on\n"
DEBUG>>^done
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
Debuggee process ID: 6388
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print pretty on\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>00000001^done
DEBUG>>=thread-group-created,id="6388"
=thread-group-created,id="6388"
DEBUG>>=thread-created,id="1",group-id="6388"
=thread-created,id="1",group-id="6388"
DEBUG>>~"[New Thread 6388.0x14fc]\n"
[New Thread 6388.0x14fc]
DEBUG>>00000002^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>=library-loaded,id="C:\\Windows\\system32\\ntdll.dll",target-name="C:\\Windows\\system32\\ntdll.dll",host-name="C:\\Windows\\system32\\ntdll.dll",symbols-loaded="0"
=library-loaded,id="C:\\Windows\\system32\\ntdll.dll",target-name="C:\\Windows\\system32\\ntdll.dll",host-name="C:\\Windows\\system32\\ntdll.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\Windows\\system32\\kernel32.dll",target-name="C:\\Windows\\system32\\kernel32.dll",host-name="C:\\Windows\\system32\\kernel32.dll",symbols-loaded="0"
=library-loaded,id="C:\\Windows\\system32\\kernel32.dll",target-name="C:\\Windows\\system32\\kernel32.dll",host-name="C:\\Windows\\system32\\kernel32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\Windows\\system32\\msvcrt.dll",target-name="C:\\Windows\\system32\\msvcrt.dll",host-name="C:\\Windows\\system32\\msvcrt.dll",symbols-loaded="0"
=library-loaded,id="C:\\Windows\\system32\\msvcrt.dll",target-name="C:\\Windows\\system32\\msvcrt.dll",host-name="C:\\Windows\\system32\\msvcrt.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\apk\\adev\\testdll\\Debug\\dodll.dll",target-name="C:\\apk\\adev\\testdll\\Debug\\dodll.dll",host-name="C:\\apk\\adev\\testdll\\Debug\\dodll.dll",symbols-loaded="0"
=library-loaded,id="C:\\apk\\adev\\testdll\\Debug\\dodll.dll",target-name="C:\\apk\\adev\\testdll\\Debug\\dodll.dll",host-name="C:\\apk\\adev\\testdll\\Debug\\dodll.dll",symbols-loaded="0"
DEBUG>>=thread-exited,id="1",group-id="6388"
=thread-exited,id="1",group-id="6388"
DEBUG>>=thread-group-exited,id="6388"
=thread-group-exited,id="6388"
DEBUG>>*stopped,reason="exited-normally"
Program exited normally.
DEBUG>>00000003-var-update "*"
Debug session ended

Re: Using "Pause when execution ends" checkbox

Posted: Wed Mar 02, 2011 12:23 pm
by eranif
The fact that you are pasting the gdb tells me whats wrong:
This checkbox is suppose to work only for executing the program NOT under the debugger (Ctrl-F5)

it has no effect what so ever on debug session.
Eran