Keep QtCreator on top when debugging - c++

When debugging a Qt application, QtCreator (3.3.2) is always below the application being debugged, when a breakpoint is hit.
It isn't too much of an issue to move the window of the application aside, but this is not always possible when, for example, a QFileDialog is opened. That window remains on top of Qt Creator, obscuring the debugging info.
There's an option in the Debug menu "Show Application On Top", but this isn't available:
I suspect this only works with QML.
Does anyone know how to ensure that QtCreator is the topmost window when a breakpoint is hit?

Related

VS Window cannot be pinned

I am using VS 2017 with the standard window configuration "vb.net".
My problem is that I cannot pin my project explorer window (also: team explorer window, etc.) at the right dock.
To be precise: I can pin it using the little pin in the title bar, but when I run the project the windows are unpinned again. The toolbox on the left side is okay and remains expanded.
Step 1: Everything is okay (Solution Explorer, Properties Windows faded in and pinned)
Step 2: Running the solution (no matter if debug mode or release mode). Closing the application
Step 3: Solution Explorer, Properties Windows faded out and not pinned any more. I have to reopen and pin it every time.
I already resetted the settings back to Visual Basic.
How can I fix this?
but when I run the project
Under the debugger? There is a separate layout for tool windows when debugging (and tends to include a whole load of debugger specific tool windows).
Which does mean if you want your Team Explorer (for example) tool window hidden on the RHS you need to set its position twice.

QML application crashes; How to Debug?

There is a crash in my QML application. Is there any way to debug it to find where it initiates?
Yes, check the "Enable QML" check box in Creator before debugging:
In the Run Settings, Debugger Settings section, select the Enable QML check box to enable QML debugging.
As mentioned though, if you have any C++ code, then the problem likely lies there, and so you shouldn't need to enable QML debugging; just debug the code as usual.

Eclipse will not stop at breakpoint and puts thread state into Running: User Request

Recently, Eclipse SDK decided to kill my brain cells.
Out of the blue, it just stopped pausing at breakpoints. I do see it hit the breakpoint, but right then window loses focus and in the thread/callstack window it shows
MyApp [C/C++ Application]
MyApp [18556][cores:1]
Thread [2] (Running : Container)
Thread [1] (Running : User Request)
gdb
I see when i hits my breakpoint and it takes a blink of an eye before it goes into above state. My app stops responding and working and i have to kill it.
My app is a non GUI application which runs in linux as a background task, it reads and writes files, performs communication through COM and TCP/UDP. No user input is ever requested or anything like that.
There are tons of people who have problems with eclipse having problems with breakpoints, however they all are about java projects and or windows version of eclipse and none of the provided solutions work for me.
So far i have:
Rebuilt index.
Cleaned and rebuild project.
Deleted all debug files, makefile, binary and built again.
Cleared all breakpoints.
Made sure it was not set to ignore breakpoints.
and probably more which i already forgot.
Eclipse version is 4.2.1
Linux: Arch linux which was not updated for like 2 years now.
Project is C++.
What other information do i need to provide?
How can i solve this problem. I can't debug my application :(
I resolved this problem in this way: "Run" -> "Debug Configuration" -> select you configuration -> Debugger.
Then check the checkbox which shows "Use external console for inferior (open a new console window for input/output)".

Qt Creator doesn't forget old objects

I have the beginnings of a Qt GUI application created in the Qt Creator IDE. I used the project initially to show off some of the IDE's features, and in the process, I ended up adding a QPushButton, but I later removed it to start building the real program. I also used the "go to slot" feature to show that off as well, which created an entry in the .ui file which I removed after removing the button.
The issue then is, whenever I launch the program, I get the following error in my IDE console:
QMetaObject::connectSlotsByName: No matching signal for on_pushButton_clicked()
All while the object pushButton does not exist anywhere in my code. I sent the project to a friend to load into his IDE, and the error was not present. I have no idea what's causing this, or if there's a cache I need to clear.

Run .exe outside IDE but use break points inside IDE

Using VS .NET 2003. Would like to run the .exe from outside the IDE (i.e. command prompt or double clicking .exe icon in windows) However, still want break points to hit in the IDE.
How do I set this up?
(Running from outside IDE but IDE seeing it as run from "Debug" -> "Start")
Thanks.
On the Debug menu, choose the "Attach to process" option to attach a debugger to your externally-running application.
Visual Studio enables Just In Time Debugging by default. If you haven't turned it off you can call DebugBreak() and you will get a popup allowing you to attach a debugger. If you don't attach a debugger then the program will exit, so you could try wrapping the DebugBreak call in a MessageBox or some other conditional code based on an environment variable or config item.
Since it is C the call to DebugBreak() is correct - this will give you a nasty error dialog (different look depending on the OS), which should have a 'Debug' option. If you click this you should get a dialog to select one of the installed debuggers (VS.NET shoud be among them). Selecting it should bring you to the DebugBreak() line. However this can fail if the debugger can not find the pdb files for your app - in that case you will just get the disassembly view and no source code view.
You can also use WinDBG and the 'Open executable option' - again it will need the pdb files to yield anything useful.