How to see Qt5 QString contents while debugging on Visual Studio 2015 - qt

I'm using visual studio 2015 and Qt5.
I'have already added qt5.natvis on Vislaualizers folders.
I have set the "Use Native Compatibility Mode" option in Tools > Options > Debugging > General menu.
Even so, QString value does not appear correctly when debugging. Only memory direction appears on Locals/Autos/Watch windows. Any idea?
I have set Verbose option for Native diagnostic messages and this is what I get:
Natvis: Parsing natvis xml file: D:\<user_name>\Documents\Visual Studio 2015\Visualizers\qt5.natvis.
Natvis: Fatal error:
Natvis: Parsing natvis xml file: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\PythonDkm.natvis.
Natvis: Fatal error:
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(128,25): Error: a pointer to a bound function may only be used to call the function
Error while evaluating 'd->data,sub' in the context of type '<executable>!QString'.
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(127,6): Ignoring visualizer for type 'QString' labeled as 'QString' because one or more sub-expressions was invalid.

Original qt5.natvis from qt plugin for MSVS contains some strange problem. I use alternative natvis.
I'm not sure if this will work correctly on MSVS 2015, if so, you can ask the author to help you

You need to use older natvis files. The ones you're using appear to use functionality that wasn't available in VS 2015.
The natvis file comes from the qt-labs/vstools repository. GitHub's online browser shows two revisions for src/qtvstools/qt5.natvis.xml, one from 2018, another from 2020.
The the 2018 revision also renamed the file from src/qtvisualizer/qt5.natvis.xml, with one prior revision.
Since the oldest revision is from 2016, maybe that'd work for you with VS 2015.

Related

Starting Gnat Studio with Alire fails

I have had a try at using Gnat Studio with the Alire package manager. Launching Gnat Studio using the 'alr edit' command is causing Gnat Studio to crash. I have had a look at the log file and there are several .dll files causing exceptions. The file entries are like this:
[PROJECTS.EXCEPTIONS] Unexpected exception: raised CONSTRAINT_ERROR : gnatcoll-projects.adb:5729 index check failed _PROJECTS.EXCEPTIONS_ [C:\GNATSTUDIO\bin\gps.libgnatcoll\libgnatcoll.dll] _PROJECTS.EXCEPTIONS_ 0x7ffc78dcecb8 ??? at ???
Gnat Studio opens in an 'inconsistent state' and crashes.
Regards
Mike
I also had problems using alire with GNAT Studio.
GNAT Studio seems to need some environment variables set by alire
to be available at project startup.
I found a GNAT plugin that automatically sets those on project start, but
I had to adapt it to work for alire 1.1.x.
My version is on GitHub at https://github.com/mhatzl/gps_alire.
Close GNAT Studio and copy the python file of the repo inside .gnatstudio/plug-ins, which should be located in your user directory.
After that, GNAT Studio should be able to setup everything needed from alire if you open your .gpr file.
Note: This works for me on Windows 10.

The specified language targets for MonoAndroid90 is missing. Ensure correct tooling is installed for 'MonoAndroid'

When trying to build an older Xamarin Forms project in Visual Studio 2019, I get the following error:
The specified language targets for MonoAndroid90 is missing. Ensure correct tooling is installed for 'MonoAndroid'. Missing: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.CSharp.targets' MediaManager C:\Users\...\.nuget\packages\msbuild.sdk.extras\2.0.24\Build\LanguageTargets\CheckMissing.targets 36
I have the following SDK items installed.
Modify the first line of the csproj file from
<Project Sdk="MSBuild.Sdk.Extras">
to the line below
<Project Sdk="MSBuild.Sdk.Extras/3.0.22">
3.0.22 was the current version of the MSBuild.Sdk.Extras Nuget package.
I also restarted VS, cleaned the project, etc. along the way.

Migration error to Visual Studio 2017

I would like to migrate my ASP.NET Core project to Visual Studio 2017 Community Edition, but I'm getting an error.
E:\xxxxxx\projectName.xproj : error : The imported project
"C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\DotNet\Microsoft.DotNet.Props"
was not found. Also, tried to find "DotNet\Microsoft.DotNet.Props" in
the fallback search path(s) for $(VSToolsPath) - "C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v15.0" . These search paths are
defined in
"C:\Users\mskur\AppData\Local\Microsoft\VisualStudio\15.0_0cd52d80\devenv.exe.config".
Confirm that the path in the declaration is correct, and that
the file exists on disk in one of the search paths.
E:\xxxxxx\projectName.xproj
Do you need something else which can help you to investigate problem?
Thanks in advance.

"One or more error occurred" When right clicking form elements

When working with either a Custom or Standard Form in AX 7, right-clicking on the Design Node, Grid Container, Group Control etc. Visual Studio freezes for a couple of seconds then displays this error message: "One or more error occurred".
This is not isolated on my development VM, coworkers also experiencing the same issue.
Anyone ran into this problem?
I think I remember running into this and you can follow these steps to clear the cache.
Delete the contents from the following folders
C:\Users\<>\AppData\Local\Microsoft\Team Foundation
C:\Users\<>\AppData\Local\Microsoft\VisualStudio
C:\Users\<>\AppData\Local\Microsoft\VSCommon
Go to the Visual Studio IDE folder in command prompt and Run the following command “devenv /resetuserdata” from the Visual Studio IDE folder.
Typical location for 64 bit: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Typical location for 32 bit: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
Per:
https://blogs.msdn.microsoft.com/willy-peter_schaub/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not/

Microsoft Visual Studio 10.0 Can not Load mso.dll for designer view

I am doing an ASP project and I am having the following problem when trying to switch from code to designer view .A pop up appears and visual studio shuts down.
cannot load "c:\PROGRA~2\MICROS~2.0\Common7\packages\vwd\mso.dll
here are some solution from the Internet that I tried and did not work out
1. I reinstalled the software ( visual studio 10.0 )
2. Some suggest to user less privileged account, so I also tried that . Did not work .
3.I have Microsoft Office Installed and its working just fine
3. I read some vague thing about a certain patch ( but could not find it )
4. The mso.dll file is NOT missing or deleted .
Here is my installation folder for my visual studio 10.0
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
HELP ! ? !
I know this post from long ago but if someone still have an issue:
Update PATH environment variables with below proper path:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd.
To solve the problem, I tried many solutions available on the web. The one that really worked for me was:
First, I used the utility "Depency Walker". I opened the "C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll" file with this utility and it found missing Msvcr90.dll file dependency.
Then download the Microsoft Visual C ++ 2008 Service Pack 1 Redistributable Package MFC Security Update and run it.
The problem was solved.

Resources