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.
Related
I have recently installed Qt Creator 4.8.0 based on Qt 5.12.0 and I have it configured like in the image below. However, I haven't managed to start the debugger. As it can be seen, the debugger is correctly set for this kit, the one I'm using right now.
Any solution?
Thanks!
Wow! I found it!!! Here in the tab "projects", there are several build and run configurations. Despite you select a default kit, the final one being executed is the one in black under this tab.
Finally I disabled all of them except the one that was properly configured in the Kits window and it worked. I hope this information is helpful for someone. I don't think that part of the configuration is clear.
I got the same error, but in my case I was using the MSVC compiler and the kit didn't manage to find the CDB debugger. I was able to fix it by going to "Add or remove programs" -> "Windows Software Development Kit" -> Modify -> Change -> Debugging Tools for Windows.
In my case it was needed to select "Enable C++" under Debugger settings
screenshot
The same dumm error QT creator shows when you simply don't have gdb installed.
Worked in my case ;)
I had the same error in MacOS, debugger suddenly stopped working (LLDB debugger worked in XCode but not Qt Creator).
In this case, I reinstalled Qt Creator and reinitialized the config by removing the .config/QtProject directory located in homedir. This solved the problem.
I had the same issue when Qt Creator didn't recognized the path to the Debugger. Due to some reason it showed multiple Auto-detected Debuggers at the same location. And on the top one of the list with the red error indicator.
see
Projects->Manage Kits...->Debuggers
I removed the erroneous Debugger and restart the Qt Creator.
I try to send debug mesage with OutputDebugString function. I use this function in my dll project and i get this message in DebugView. I also use this function in my console app project(same solution) but i can't get messages. All messages appear in the DebugView except for the console application. It does not even appear the simple OutputDebugStringA("debug"); or OutputDebugString(L"debug"); codes. What could it cause?
One issue is that whether you visit it in your VS output window or the tool DebugView here: https://technet.microsoft.com/en-us/sysinternals/bb896647?f=255&MSPPError=-2147217396. They are different.
If you use the Debug view, not debug your app, just run it using "start without debugging(Ctrl+F5)".
If you use the VS output window and other apps output normally, just the specific console app has this issue, I don't think it is related to the debugger tool, we would think about the project itself or VS Settings.
(1)Please set a breakpoint in the code line "OutputDebugString(L"debug");", and then debug your app using "F5", after the breakpoint was hit, click "Step Into (F11)", and then visit your debug output window. Maybe the specific line code was not called in your side.
(2)Since there are different projects in the same solution, please set this console app as the start up project. Or you could just create a single solution for this project, debug it again. At least, we could know that whether other projects impact this specific console app.
(3) Just test it in other VS IDE, make sure that it is not the VS IDE issue. I just use the default VS settings in my side, it works well.
Reference:
https://blogs.msdn.microsoft.com/reiley/2011/07/29/a-debugging-approach-to-outputdebugstring/
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?
I cannot seem to start the built-in profiler, I have tried a number of settings and it still wont run. I get this message;
I have enabled qml debugging under 'Build Steps' like so;
I have also enabled it under 'Debugger Settings' (and followed the pre-requisites).
I have restarted, rebuilt, cleaned and re-ran qmake. I would appreciate any help.
Check Projects->(Whatever target)->Run settings and make sure the QML checkbox is set next to the debugger languages. Report back if this fixes your problem.
I am trying to dissect a legacy application through debugging, but I can't get the breakpoint to hit in certain places of the application. The application has a c# GUI frontend and a c++ backend.
I am trying to put a breakpoint in a c++ project of the solution. There are a couple of c++ projects, but I cannot set a breakpoint in one of them. I tried deleting bin/obj files but had no luck.
Afterwards I checked debug > windows > modules, and then noticed that the dll for that particular project is not being shown. The program executes correctly, but perhaps since there is no entry for that project shown in debug > windows > modules, a breakpoint cannot be set. The problem is, I don't know how to make a fix to this problem. Can anyone give a helping hand?
Thanks a lot in advance.
It sounds like you need to enable unmanaged code debugging. Try the follownig
Right click on the C# project and select Properties
Go to the Debug tab
Check "Enable Unmanaged Code Debugging"