| Summary: | Debugging C++ console programs with std::cin keyboard inputs aborts the debug. | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Javier G. <jagarni1983> | 
| Component: | general | Assignee: | kdevelop-bugs-null | 
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | niko.sams | 
| Priority: | NOR | ||
| Version First Reported In: | 4.0.2 | ||
| Target Milestone: | 4.1.0 | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| kdevelop 4.2 should have the ability to run an application in an external terminal, left to be tested whether that makes it work though :) *** This bug has been marked as a duplicate of bug 236516 *** | 
Version: 4.0.2 (using KDE 4.5.1) OS: Linux If you try to debug a c++ program that use the C++ input command std::cin the debugged program automatically ends when arrives to that std::cin line and is executed. Reproducible: Always Steps to Reproduce: // Very simple test of this problem #include <iostream> using namespace std ; int main () { int i; cout << "Example of how debug abort execution when arrives to a simple cin command." << endl; cin >> i; cout << "You wrote: " << i << endl; return 0; } Actual Results: Example of how debug abort execution when arrives to a simple cin command. Expected Results: Example of how debug abort execution when arrives to a simple cin command. 3 You wrote: 3 If I follow the workaround posted time ago for this bug from http://www.kdevelop.org/phorum5/read.php?2,33015 it says: "One solution reported in IRC: 1) In KDevelop4: Build your program 2) Start your program in Konsole 3) In KDevelop4: Run -> Attach to Process and select your program Now the gdb is connected to your program" Not works because if I reproduce the same steps always I get a error window with the message: "No se puede adjuntar el depurador. ptrace: Operaci\303\263n no permitida." traslated would be: "Can not be attached the debugger. ptrace: Operation not allowed."