[SOLVED] Debugger Crashes on Start-Up on a Fresh Install (Windows 7 64-bit)
I am very new to Qt and installed Qt creator on two 64-bit Windows 7 machines today to get familiar with the environment. Upon building a simple "Hello World!" project I am greeted with the error message "During startup program exited with code 0x0." My application builds and executes in a command window in the background but the debugger fails to catch a breakpoint on the first line of my "main()" function (cout << "Hello World!" << endl;). I am using the MinGWW installation which came with Qt creator but it seems that, despite my best efforts, the program will not debug! Let me know what I am doing wrong to correct this problem. I really want to get this working!
Also, I apologize for not providing a dump of any sort of data. If that would be helpful in determining the cause of this problem let me know where I can obtain the files and I will gladly provide them.
[SOLVED] - For MinGW
- Open your project.
- Hit Ctrl+F5 to switch to Projects mode or click the relevant icon.
- Click the "Targets" button near the top left of the screen.
- Click the "Run" button near the top center of the screen within the "Targets" tab.
- Uncheck "Run in terminal"
This allowed me to debug my MinGW project. I still can't debug my MSVC project but I haven't really looked into that error.
When I click debug a message box appears saying,
"The preferred debugger engine for debugging binaries of type 'x86-windows-msvc2010-pe-32bit' is not avaliable.
The debugger engine 'Gdb engine' will be used as a fallback.
Details: There is no CDB binary available for binaries in format 'x86-windows-msvc2012-pe-32bit'".
On the computer I'm using to test this on I have not yet installed CDB so as of now I expect this error. I will install CDB from the Windows 8 SDK (the old version is no longer easy to obtain) and post a reply if I am able to debug MSVC projects.
[SOLVED] - For MSVC
- Install "Debugging Tools" from the Windows 8 SDK located at http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx
- In Qt Creator click Tools
- Click "Options..." from the drop-down menu.
- Click "Build & Run" on the side-bar.
- Click the "Tool Chains" tab.
- Select all of the items in the list which declare MSVC as their type.
- Click the "Clone" button.
(Repeat steps 6 and 7 until each item is cloned.)
- For each of your newly cloned items set the the path to the Windows Console Debugger executable to "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64\cdb.exe" or wherever you installed the Windows Console Debugger.
- Click the "Apply" button.
- Click "Debugger on the side-bar.
- Click the "CDB" tab.
- Check "Use CDB console".
- Next to the "Symbol paths:" textbox click the down arrow on the "Insert..." button.
- Click "Symbol Server..." from the drop-down menu.
- Click the "OK" button.
- Click the "Apply" button.
Hi bubbleking2, welcome to Qt!
Have a look at http://qt-project.org/forums/viewthread/15293 -- others have had the same problem, and seem to have solved it. See if it works for you.
You are a godsend!
Unchecking "Run in Terminal" solved everything. Thank you very much!
If anyone is interested I have determined the cause of this bug for MinGW. I created a relevant topic at http://qt-project.org/forums/viewthread/19385/
You're welcome; glad you solved it. :) Thank you also for writing up clear and detailed instructions for others' benefit!