User forums > Help
After upgrade to Codeblocks svn 7932 debugging does not work
resander:
I am on Ubuntu 10.04 LTS and updated Codeblocks a couple of hours ago (Sunday 15 Apr 2012) using the GUI Update Manager on the Ubuntu System->Manager menu.
A handful of packages including Codeblocks were updated. The Codeblocks is now SVN 7932.
The main debugging functions goto cursor (F4) and stopping at breakpoint (set by F5) do not work any more.
Using F4 brings up a blank Program Console screen and the execution does not stop at the line with the cursor. Program appears to be hanging.
Breakpoints set by F5 are ignored and the program runs to completion.
The Run/Build-Run functions on the Codeblocks Build appear to be OK and run the program to completion.
Debugging was working fine before the update, so maybe the update install failed in some way. I did not notice any error messages, but I may have missed them.
I always use Jens Lody's updates that come to me via the Ubuntu Update manager. That has always worked very well in the past.
There are command-line APT functions for working with packages, but I have never used any of these. Trying without any knowledge of the various Codeblocks packages/modules might make it worse.
I would like to initiate a complete reinstall of SVN 7932 (or an earlier svn) in the simplest possible way. How do I do that?
Ken
Jenna:
I have the same issue here, since some time.
It should work id the command to call the terminal-emulator contains a -T (like the default one for xterm).
The followin patch should fix it (at least it works fine here with it).
I wonder why it ever has worked with terminal-emulators, that do not use -T for setting the title, but e.g. -t like gnome-terminal.
Cab other Linux (and probaly mac-) users test the patch and give some feedback here ?
--- Code: ---Index: src/sdk/cbplugin.cpp
===================================================================
--- src/sdk/cbplugin.cpp
+++ src/sdk/cbplugin.cpp
@@ -900,7 +900,7 @@ wxString cbDebuggerPlugin::GetConsoleTty(int ConsolePid)
do
{
// check for correct "sleep" line
- if (psCmd.Contains(wxT("-T")))
+ if (psCmd.Find(ConsPidStr) != wxNOT_FOUND)
break; //error;wrong sleep line.
// found "sleep 93343" string, extract tty field
ConsTtyStr = wxT("/dev/") + psCmd.BeforeFirst(' ');
--- End code ---
resander:
Thanks Jens,
My terminal emulator setting in Codeblocks Settings->Environment is:
gnome-terminal -t $TITLE -x
It has been like that for the last couple of years. This svn 7932 upgrade is the first to cause problems.
I tried with capital T (gnome-terminal -T $TITLE -x), but it did not start the emulator.
Also tried all permuations of xterm -t $TITLE -x with same negative outcome.
I am using a Compaq desktop with 2gb RAM and there is about 25gb free space left on the hard disk, so I don't think codeblocks in running out of resources when running on my PC. What about codeblocks stack space?
I have also tried some other projects and they are also affected by this.
I would like to install svn 7932 again to eliminate a bad install being the cause. If that still fails I need to go back to a previous version, because I totally depend on having debugging working.
Ken
P.S.
Forgot to mention that the black-on-white Gnome terminal with scrolling and cut-and-paste capability is working fine when using the Codeblocks Run and Build-Run menu commands. All my output logging come out the way I intended. That means the gnome-terminal is still invoked correctly. Could the problem be caused by the codeblocks initiating gdb?
Jenna:
--- Quote from: resander on April 16, 2012, 09:35:19 am ---Also tried all permuations of xterm -t $TITLE -x with same negative outcome.
--- End quote ---
If you try xterm with -T (capital t) it will most likely work.
The code did not chaneg for ages, and it does not work since some revisions.
We use wxString::Contains here, which is deprecated anyway.
Maybe it was case-insensitive in older wxWidgets revisions, but I don't think they have changed anything here (at least not in wx2.8).
resander:
Hi Jens,
I tried:
xterm -T:
The console window shows after placing the cursor and issuing F4, for example I can issue linux commands e.g. ls -l. For a minute or two. Then the console window disappears and the program window showing the program position where I placed the cursor appears. Stepping with F7 and Shift+F7 works. However, the console window has gone which makes console input impossible for command-line programs and tracing with printfs for application and logging cannot work.
I also noticed that the Watches function has changed. Specifying variables to be watched is easier now and the display of structs is much better. However, Function arguments and Local variables are not available from the Watches window and I could not resize the window.
The automatic display of a variable value when the cursor hovers over the variable does not work any more.
Trying xterm -T $TITLE -x:
On F4 the program window appears correctly marked and stepping is working.
No console window shows. Otherwise same as xterm -x.
gnome-terminal -t $TITLE -x again:
No console window shows on F4 and setting debugs via F5. The program runs to completion, but the debugger continues to run.
The console window appears when program is started from the Run or Build&Run menu items.
Hovering over a variable does not show its value.
Other changes:
I just noticed a new item 'Active debuggers' at the top of the Debug menu. I tried the two radio-button settings but that did not make any difference. There may be other differences too as I only use a very small subset of debug functions and may have missed them.
Q1. The previous svn version I used is 78xx (don't remember). It worked and 7932 does not. What is new in svn 7932?
I first thought the problems were caused by a bad/failed/incomplete install of codeblocks 7932 via the Ubuntu Update Manager. That is looking less likely now, but I could do a reinstall just to make sure.
The Ubuntu Synaptic Manager shows that the latest version of Codeblocks is (10.05svn7932-1) with details as follows:
PACKAGE INSTALLED
codeblocks Yes
codeblocks-additional
codeblocks-additional-common-properties
codeblocks-additional-dbg
codeblocks-common Yes
codeblocks-contrib
codeblocks-contrib-common Yes
codeblocks-contrib-dbg
codeblocks-dbg
codeblocks-dev yes
codeblocks-headers yes
codeblocks-libwxcontril0 yes
codeblocks-wxcontrib-dev
codeblocks-wxcontrib-header
libwxsmithlib0 yes
wxsmith-dev
wxsmith-headers
Q2. Not all modules are installed, in particular codeblocks-dbg and codelocks-contrib-dbg. Is that correct? Should these and perhaps some other modules also be installed?
Q3. The synaptic manager provides functions for installing, reinstalling and removing modules. If I first ask it to remove all codeblocks modules shown as installed above, then what packages/modules shall I request for the reinstall?
Ken
Navigation
[0] Message Index
[#] Next page
Go to full version