Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 2.3.0
-
None
-
Ms Windows 7 x64, Qt 4.7.4
-
785b82177fe55d2773b7c30884979759c4ab9291
Description
Step to reproduce:
1. Create simple Qt console application
2. Add a few instructions and set a break point somewhere
3. Make sure you have "Run in terminal" option set in Projects>Run options
4. Go to debug tab and show debugger log for better understanding of the issue (Window > Views > Debugger's log
5. Run the debugger (e.g. F5)
What's happening:
QtCreator spawns new command prompt window and runs the debugging application inside it, before gdb fully starts (you can see, that the magic is still outputting in debugger's log, when the application being debugged is already run), which results in break points not being respected (in fact, the application will manage to finish before gdb even sets any breakpoints).
How it should work:
Gdb starts before application is run.
An example:
// main.cpp #include <iostream> #include <cstdlib> int main(int argc, char *argv[]) { // system("pause"); int i = 5; ++i; std::cout << i << std::endl; return 0; }
Example's description:
Set a break point at the ++i; instruction and watch how it's not being respected by the "too-late-start" debugger. Next, uncomment the system("pause"); instruction, run debugging (terminal window starts and waits; gdb is being started), wait for the debugger to start (wait until the magic in the log stops generating), press any key in the terminal window and watch, how debugger correctly breaks execution at desired line.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-4997 Windows Qt Creator debugger skips breakpoints set at the first lines of main()
- Closed