Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: alle_meije on October 23, 2012, 02:56:28 pm

Title: debugger -> "The program is not being run."
Post by: alle_meije on October 23, 2012, 02:56:28 pm
Hi, I have a program (very ambitiously) called fastSVM, which depends on 2 other projects:

fastSVM <- libPMT <- libFFTW

I have compiled the Debug builds of these projects (from left to right),
all with Build Options -> Compiler settings -> Compiler flags

[v] Produce debugging symbols [-g]
[ ]
[ ]
[ ]
[v] Enable all compiler warnings (override most other settings) [-Wall]
[ ]
...

-- those two are ticked, and no other.

When I debug with a breakpoint on the 1st line of the main program, the Debugger window says:

>>
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Release
Adding source dir: /esa/data-amwink/software/cpp/pmtprojects/fastSVM/
Adding source dir: /esa/data-amwink/software/cpp/pmtprojects/fastSVM/
Adding file: bin/Release/fastSVM
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
<<

But when I do 'next line' or 'step into' I immediately get

>>
The program is not being run.
Debugger finished with status 0
<<

Do I need to change the setup of Code::Blocks? Do I need to install debugging packages (other than gdb)?
Not having used the debugger for a while (couple of months) it has changed from working to not working...

Happy to send more info if that's helpful.

Any ideas?
Thanks!
Title: Re: debugger -> "The program is not being run."
Post by: oBFusCATed on October 23, 2012, 03:23:01 pm
Code
Selecting target:
Release
Adding source dir: /esa/data-amwink/software/cpp/pmtprojects/fastSVM/
Adding source dir: /esa/data-amwink/software/cpp/pmtprojects/fastSVM/
Adding file: bin/Release/fastSVM
Simple solution -> switch to the debug target, you're running the release one.
Title: Re: debugger -> "The program is not being run."
Post by: alle_meije on October 23, 2012, 03:42:34 pm
Thanks for your quick reply. That sounds simple.

So for all projects I changed/confirmed " Project -> Properties -> Debugger -> Select target " to be " Debug "
Also, I did a "Clean workspace" for all Debug *and* Release targets, and only re-compiled the Debug targets.

The pull-down menu "Build target" is therefore set to "Debug" in all projects.

But when I start Debug, it still selects Release as the target...
Is there another place where this need to be selected?

Many thanks for your help
Title: Re: debugger -> "The program is not being run."
Post by: oBFusCATed on October 23, 2012, 03:45:49 pm
So for all projects I changed/confirmed " Project -> Properties -> Debugger -> Select target " to be " Debug "
This is not needed...

What version of C::B are you using? How are you starting the debugger?
Title: Re: debugger -> "The program is not being run."
Post by: alle_meije on October 23, 2012, 03:56:04 pm
I'm using Code::Blocks 10.05
(build: May 1 2011, 04:13:54 - wx2.8.11 (Linux, unicode) - 64 bit)

That's the latest one provided by Ubuntu as far as I know (10.05-2)

I just start the debugger via the menu, using [Debug/Continue], [Run to cursor] etc.
Title: Re: debugger -> "The program is not being run."
Post by: oBFusCATed on October 23, 2012, 04:04:06 pm
Strange.
Try a nightly build.
See how to install it by looking at the nighlies sub-forum.
Title: Re: debugger -> "The program is not being run."
Post by: alle_meije on October 24, 2012, 11:06:52 am
Decided not to do the nightly build and keep looking...
(I like the lazy package management option too much)

What I did try was re-creating the project from scratch
(in case the project file was corrupted, which turned out to be the case)

With the new project file, the Debug target is chosen.
Still not sure what went wrong in the other project -- somewhere a setting must have been changed? -- but happy to have it working again!

Thanks for your suggestions!
Title: Re: debugger -> "The program is not being run."
Post by: oBFusCATed on October 24, 2012, 11:59:38 am
Decided not to do the nightly build and keep looking...
(I like the lazy package management option too much)
If you've search about it you would have found that we have packages...
Title: Re: debugger -> "The program is not being run."
Post by: Jenna on October 24, 2012, 01:52:35 pm
And if you use the package provided by Ubuntu, you have to file a bugreport there.
The packages are maintained by Ubuntu and there's nothing we can do to fix anything.
For ubuntu you can use pasgui's ppa :https://launchpad.net/~pasgui/+archive/ppa/ (https://launchpad.net/~pasgui/+archive/ppa/) or try my repo for debian (see sig), but this can not be used with all versions of ubuntu, due to dependency problems.