Bug 66546 - debugging with cin doesn't work in alpha6, with alpha7 it doesn't work at all.
Summary: debugging with cin doesn't work in alpha6, with alpha7 it doesn't work at all.
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-25 12:48 UTC by Klavs Klavsen
Modified: 2003-10-27 11:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klavs Klavsen 2003-10-25 12:48:07 UTC
Version:           3.0.0alpha6 and alpha7 (using KDE KDE 3.1.4)
Installed from:    Compiled From Sources
Compiler:          gcc-3.2.3 std. PIII optimizations - nothing fancy.
OS:          Linux

I've worked with alpha6 for a long time (or rather my girlfriend has - it's her that uses the program mostly). 

This is with alpha6.
I just found the other day, that you could allow your cin to work, while debugging, if you enable "Project->Project options->Debugger->Enable seperate terminal for application I/O" it won't debug, as it says it can't find the executable file in de <projectdir>/debug/src directory f.ex. (can't find /home/username/projectname/debug/src/projectname). However if I try to just execute the file (from kdevelop) it runs just fine. If I now go, disable the above mentioned setting, it still complains like it did before, and the only way to make it able to debug again, is to create a new project and copy the source-file contents over.

With alpha7, it won't debug at all. It keeps complaining as with alpha6, even though I never enabled "Project->Project options->Debugger->Enable seperate terminal for application I/O" for this project, so I had to install alpha6 again.
Comment 1 Jens Dagerbo 2003-10-27 09:30:26 UTC
I very much doubt any debugging problems depend on the "seperate terminal for I/O" setting. Assuming I'm right, this report reduces to "It doesn't work!"

But it does work when I use it, so something is wrong here. Please submit more info if we are to be able to help / solve this issue.
Comment 2 Klavs Klavsen 2003-10-27 09:45:37 UTC
You may doubt it all you want, but that is EXACTLY what happens.

When I enable the option explained, it complains it can't find the executable, when I start debug - and gives the exact path to where it is. Even though it runs just fine, if you just execute it (also if you do it via kdevelop). And even if I disable the beforementioned option, it is as if it doesn't really disable it, as it acts as it did with it enabled. Only solution in Alpha6 (that I've found) was to create a new project, and then it worked fine (until I tried to enable the option again).

For now, I've been debugging by uncommenting any cin statements and just setting the variables manually to what I would have read in. Want a screendump of the error?
Comment 3 Jens Dagerbo 2003-10-27 10:31:21 UTC
Unfortunately, I have neither alpha available, only CVS HEAD, but I can't make it misbehave here, no matter how many times I enable/disable the seperate terminal.

Some questions that might help track this down:

What project type is this? What projec manager is used? Is it created from a KDevelop template or is it imported? Is the project built with debug info?
Does the project have an active target? What settings are set in project -> run options and project -> debugger options? Is the problem repeatable with every project, or just this one?

Comment 4 Klavs Klavsen 2003-10-27 10:43:20 UTC
It's in every project. I just select project->new and choose c++ hello world project, and just select default settings for everything.

I haven't changed any settings, they are exactly as default. 

The project is compiling fine, and executes just fine (when not debugging - and when debugging, and I haven't tried enabling the option to allow cin to work).

The settings set in project -> run options = 
- Run from the directory where the executable is

The settings set in project -> debugger = 
- Debuggin Shel: libtool
- Display mangled names
- Try Settings breakpoint on library loading

What isn't mentioned here, is set to nothing/not set.
Comment 5 Jens Dagerbo 2003-10-27 11:05:34 UTC
For a simple C++ hello world project, I don't think libtool should be present (and it isn't in HEAD). Try removing it from the debugger settings and please report.
Comment 6 Klavs Klavsen 2003-10-27 11:36:55 UTC
That helped. I removed libtool, and now it works.

Only detail is that the debugging menu (the small seperate window with all the debugging options, step into, step over etc) is not there, but I can use the icons on the main window, so it's no biggy :)

perhaps you should not enable libtool by default? When is libtool supposed to be used?

Thank you very much.
Comment 7 Jens Dagerbo 2003-10-27 11:59:21 UTC
Works? Great! :)

Libtool is typically used with KDE projects. I suspect it was a problem with the "simple c++ hello world" project template that has since been corrected (In CVS HEAD the setting is correct by default.) but it wasn't applied to the project until you made the first "save" on the debugger settings, in your case the (unrelated) "seperate I/O" setting.