How to avoid invisible breakpoints in QtCreator? - multithreading

QtCreator is my favorite C++ IDE. Now I use " QtCreator + VC141 (vs2017) + WinDebug" to develop my x64 software on windows.
It works perfectly at first. But then at a time, it often encounter invisible breakpoints when I start debugging.
The screen show following picture.
I use QtCreator in this situation for a long time, but when I finally need to implement software itnerface, I found it is impossible to used QtCreator for debugging. Because UI needs evevent loop, QtCreator always triggered invisible breakpoint.
By the way, I found that QtCreator usually (not every time) encounters invisible breakpoints when threads changes.
Does anyone have encoutered this problem?

I found the solution.
Under "tools->Options->Debugger"
disable
"Breakpoints->Thread creation"
"Breakpoints->Thread exit"
"Various->When CrtDbgReport() called"
The problem doesnot shown any more.
But debuggers will no stop at "assert()" in code.
So Turn on "1/2", if you need "assert()".

Related

MSVC and Intellicense doesn't display autocompletion

ALL,
I'm working on the huge project and sometimes I need to switch to the browser to check the documentation on STL (especially when different standards are involved).
So when I start typing I do see the autocompletion, but if I stop somewhere in the middle, press ALT+TAB twice and continue, there will be no autocompletion anymore.
Is there a way to make it work always? Or ts just how Intellicense works?
This is on MSVC 2017.
TIA!!

Compiling pascal program in Visual Studio Code for Linux

Recently, I switched my OS to Ubuntu. I just started with collage and I have to learn pascal for my finals. But a problem occurred.
I installed Visual Studio Code and Pascal extension for it, but I am unable to run even a simple Hello World code. I wrote code, it saved automatically as .pas, but when I enter debug & run option in VSC it displays a message that says 'Open a file which can be debugged or run.', followed by 'debug' and 'run' buttons that I am unable to click and another message that says 'To further configure Debug and Run create a launch.json file.'
I am not even sure am I supposed to post questions such as this one on stackoverflow, but I sincerelly hope that someone could give me a hint on what to do. Solve this within Visual Studio Code or switch to another IDE (and which one would you recommend for Linux user) and pretend that nothing happened?
Thanks in advance.
I know this isn't an answer to "how to debug with pascal with vscode" but, perhaps you would find it easier to just use FPC / Lazarus (IDE) to do your work. While it doesn't have a dark theme, contrary to popular belief, that's not necessary to program.
The IDE is feature packed and allows for full code completion, debugging, etc... (everything you really need to do the work for school).
Additionally, you can use this open source tool to install everything you need for your platform in just a few button clicks (also allows for installing common library packages)
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
download release for your OS
under "FPC Version" & "Lazarus Version" select trunkgit (or stable for an older version)
click the "Install/Update FPC + Lazarus" button
Have you Installed Pascal extension which is available for code to smoothly run pascal code.
If you haven't then try installing this extension using,
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
ext install alefragnani.pascal
You can always check,
https://marketplace.visualstudio.com/items?itemName=alefragnani.pascal
to install and configure pascal in vscode.
I will direct you to the debugging page from the Visual Studio Code documentation that details how to use the debugger and configure a launch.json file. VSCode is a generic IDE so you need to give it some information about your project before it knows how to run the debugger. This is what launch.json is for.
If I could make a suggestion. When you're learning how to program, it's best to start with the basics. Write a small program in a text editor (VSCode is fine, or Vim, or Nano, or Notepad, or whatever). Save the file. Compile and run the program on the command line.
Once you put an IDE in the mix, you have to learn how to use that as well. If you're stuck on both parts, it can be hard to make progress. That said, it's good to learn how to use the IDE, and you should spend some time reading the documentation and working through some of the examples. It takes some time, but it will pay you back a thousand times when you can work more quickly.

Clion on linux closes on backspace/delete

I've downloaded clion and installed it on linux ubuntu to be able to use swift on linux. It works fine except for the fact that whenever I hit either the "backspace" or "delete" button, it just closes. No error message, nothing.
-- Edit --
I actually just tested some more and noticed that it closes on whatever input you give it... (as in random letters)
I've checked the keyboard shortcuts in the settings, but couldn't find anything that could cause this. Building and running the projects works, so I'm guessing it has nothing to do with a faulty installation...
What could cause this?

QTabWidget tab switch shortcuts don't work under some Linux DE

I'm writing a rather complex editor with a huge number of keyboard shortcuts (or "hotkeys"), using standard Qt's way like QShortcut/QKeySequence. I have no prob with all this until the recent time.
For the QTabWidget easy tab switching i used documentation-recommended Alt- shortcuts, adding &-symbol to the tab's title text.But under Windows 7/Linux + Gnome 3 this way works well, and under Linux + KDE/Unity - it doesn't.I'm assume the problem is somethere in the X11 desktop environment shortcut handling mechanics. Maybe it handle Alt+ sequences itself and don't pass to the clients, for example.
Can i debug such situations in the clear way? Debugging the KDE code, for example, is too time-consuming :( Understand ALL Linux DEs shortcut code... the mission is completely impossible.
Or maybe i'm just using invalid way to write a really crossplatform Qt application?Or, the third option - i'm just catched a bug :)
This problem occurs due to Qt bug: https://bugreports.qt-project.org/browse/QTBUG-32908

Eclipse: some keyboard's key suddenly stop working

I feel the need to understand why, while I'm working in eclipse, some keys stop working, especially backspace and del keys.
I have searched on the net and found that it is recognized as a bug: I often read that the problem is related to other applications.
So the best advice is to restart Eckipse. (???)
Someone should explain to the Eclipse's developers that it cannot stop working (or working bad) if some other application stops working or crashes.
ps. Now I'm working in Ubuntu, but I see that the problem is platform-independent.
If you use many keyboard layouts, you may have accidentally changed them by pressing alt+shift. If that's the case, pressing it again will restore it to the normal layout.

Resources