How to prevent Qt Creator Debugger console from popping up - qt

During debug in QtCreator 4.6.2 (I debug QML) the QtCreator debugger console (view #5) constantly pops up. My debugging tasks typically rely on log analysis and such distractions heavily decrease productivity.
Surprisingly I could not find any related option in Tools -> Options -> Debugger pane. Is it possible anyway?

Related

xamarin.forms Android release build only works with fast deployment enabled

For the past days I had major issues with deploying the android version of my app. I found out that I am only ever able to get the app to work when "Fast Deployment" is checked. However, this means I can never archieve my app. If fast deploy is enabled, the app, even though it is in release mode, is treated like a DEBUG build and therefore not accepted in the playstore.
If i uncheck fast deploy for release builds the app starts and then idles, not doing the first rest call it is supposed to do. If I leave the rest calls out, the app again works.
How can this be correlated?
The symptom that it works when set "Fast Deployment" suggests this situation:
If you are testing a release build on a device that previously had a debug build, its possible that the debug version did not get fully uninstalled. Specifically, "Fast Deployment" stores the xamarin library as a separate DLL. Because your release build has the same "bundle id" as the debug build, Android can get confused.
To fix.
Best Fix for emulator:
Tools / Android Device Manager / Select virtual device / Edit / Clear to Factory Defaults.
Quickest fix for phone (but not sure if it helps):
Drag app to trash can.
Power down the phone. Power it back on.
Deploy release build to device. Either by installing apk, or by "Start Without Debugging" menu item.
Quick Fix:
Run debug version again on the device. This makes sure Android "knows" that the debug version of app is there.
Stop the app.
On the device, "uninstall" the app. (Drag it to trash can).
Deploy release build to device. Either by installing apk, or by "Start Without Debugging" menu item.
If that doesn't work, then use "adb uninstall":
Run debug version again on the device. This makes sure Android "knows" that the debug version of app is there.
Stop the app.
menu Tools / Android / Android Adb Command Prompt.
adb uninstall com.companyname.appname <-- substitute your app's bundle id
deploy release build to device.
It turnes out that turning ON my linker to link assemblies only actually decreased the app size AND made everything work again. Before, the linker was set to LINK NONE (which should've been the safer bet, but turned out to be an error...).

Can't set breakpoint in QT Creator when debugging with CDB while processing is running

I am not able to set breakpoint in my program when debugging with CDB while the process is running. When I made a click on the left of the source line to set the break point, I got a red breakpoint with a busy status indicator on top of it. The busy indicator never goes away as expected. If I set a breakpoint prior to starting debugging, they will be applied successfully.
If I select Debug->interrupt from the menu while the process is running, QT Creator is not able to pause the process either. Therefore, I believe the cause of the problem is that QTC is not able to pause the process and apply the breakpoint.
If I use GDB, everything is fine. But I don't like to use GDB due to its much slower compiling speed.
Please check if you have the debugging tools for windows installed on your machine.
http://msdn.microsoft.com/en-us/windows/hardware/gg463009
Check if CDB finds the microsoft symbols.
Go to Tools >> Options >> Debugger
Check if the following path is present in Symbol Paths Text field:
C:\Program Files\Debugging Tools for Windows (x64)
symsrv*symsrv.dll*C:\Users\vish6025\AppData\Local\Temp\symbolcache*http://msdl.microsoft.com/download/symbols
If it's your operating system is 32 bit, You point it to
C:\Program Files\Debugging Tools for Windows

exe with console and gui mode

I compile my qt-project with += console option,
I need it to debug version, and for release I rebuild
project with -= console
But sometimes I need enable\show console output in release version of my app.
So my question is - Is it possible to pass some argument (line -show_console) to
my .exe to start app with console or without (if no option specified)?
I have an application with a GUI window and a console window. I open the console window using AllocConsole from the Windows API. The trouble is, Qt can't debug it, at least using gdb, because gdb needs a console too. But see my question here for a workaround.
If you mean you want a gui app that also writes to the console then under windows you need to reopen the console.
Alternatively - Set the application type to console ( ie /subsystem:console in windows) but still write the normal Qt gui code, it will open a console and you can use std::cout

Tricky Qt / OpenGL bug - everything crashes

I have an annoying and unfortunately urgent problem. I started out by trying to subclass the QGLWidget for my Windows application in Visual Studio 2008 x86. It crashed immediately upon running, as far as I could tell, when the QGLWidget was instantiated. Finally I ended up trying all the included Qt examples for Open GL, and they all behave the same - crashing as follows:
Error message pops up:
"Windows has triggered a breakpoint in
2dpainting.exe..."
The execution halts in qgl_win.cpp (breakpoint indicated):
QGLTemporaryContext::~QGLTemporaryContext()
{
wglMakeCurrent(d->dmy_pdc, 0);
wglDeleteContext(d->dmy_rc);
ReleaseDC(d->dmy_id, d->dmy_pdc);
DestroyWindow(d->dmy_id);
--> if (d->old_dc && d->old_context)
wglMakeCurrent(d->old_dc, d->old_context);
}
Output:
... HEAP[2dpainting.exe]: HEAP: Free
Heap block a40c108 modified at a40c288
after it was freed Windows has
triggered a breakpoint in
2dpainting.exe.
This may be due to a corruption of the
heap, which indicates a bug in
2dpainting.exe or any of the DLLs it
has loaded ...
Also happens when I switch from debug to release. However, I can run most of these Open GL example compiled executables just fine.
I can't find anything through internet searches. Gurus, please help!
Thanks,
Matt
I resolved the problem by updating my graphics drivers to their latest version. Strange, because I'm using the Intel GMA 965 Express chipset, which is already very old.
Now all the Qt examples compile just fine. No heap corruption.
I'm also able to run the main Qt Examples and Demos app from the start menu, which I was never able to do before - it would just crash.

how to debug swf browser crashes

My swf is occasionally crashing the browser (or just crashing the plugin as chrome tells me).
How do I diagnose the bug? I am developing for flash player 9 using flex.
Things I have tried:
Turned on log files so I can see trace("...") output. However, my log files, and my swf, are ending at inconsistent termination points.
Install the debug version of the flash player
Tried different browsers (today I am on vista, and can reproduce the bug on four browsers).
I am hoping there is a [legible] stack trace from the plugin. Any suggestions?
It's likely that the flash plugin is causing the crash before your log files can be flushed. The only thing I can recommend is to install the Windows Debugging Tools.
Then bring up a command prompt (as administrator if in vista), and type the following:
cd "%programfiles%\Debugging Tools for Windows"
adplus -crash -pn iexplore.exe
(Obviously, change iexplore.exe to whatever browser you are running against.)
Now, use your flex application in the browser until it crashes. This will create a crash dump in %programfiles%\Debugging Tools for Windows\Crash_Mode__Date_02-18-2009__Time_14-40-0202 (actual date will be used).
You can now send that mini-dump (smallest dmp file) to Adobe so they can analyze it properly.
If you want to view the (native) call stacks in hope of discovering what caused the issue, you can load windbg and load the dump file (File > Open Crash Dump). Once it's loaded type the following at the windbg commandline and hit enter:
~* kb 2000
Some specifics on the bug I uncovered regarding masks and textfields:
http://summitprojectsflashblog.wordpress.com/2008/04/16/flash-browser-crashing-bug/
http://team.bkwld.com/2007/11/21/flash-player-crashes-browser-when-closing-window-possible-fix/

Resources