You can't just copy and use the file because of the "##NAMESPACE##:: everywhere

You can find/replace this token all over the file. Easy and it works (using 
Visual Studio).

Philippe

On Fri, 21 Feb 2025 16:40:40 +0100
Nicolas Arnaud-Cormos via Development <development@qt-project.org> wrote:

Hi everyone,
> 
> On Windows, for those using Visual Studio or VS Code with MSVC compiler, the 
> only way to see anything sensible when debugging is to use a natvis file.
> 
> This natvis file is currently embedded into the VsTools extension for Visual 
> Studio, here:
> https://github.com/qt-labs/vstools/blob/dev/QtVsTools.Package/qt6.natvis.xml
> 
> If you use Visual Studio, and use the extension, you normally have nothing to 
> do as it will be deployed for you.
> 
> Unfortunately, I see some issues here:
> 1) The file is really behind (the Qt5 one was better IMO), and there's no 
> real contributions to it, but rather external ones like:
> https://github.com/aleksey-nikolaev/natvis-collection/blob/master/QJson.natvis
> 2) You can't just copy and use the file because of the "##NAMESPACE##:: 
> everywhere
> 3) If you use VSCode, you have to embed it in the project
> 
> As a VSCode user, I'm doing 3), but it's not really any better as I'm missing 
> any updates on it.
> I know there's now a Qt VSCode extension, with the natvis file integrated 
> too, but I couldn't get it to work properly.
> 
> I think a better solution would be to have the natvis files embedded into the 
> pdb on Windows, for multiple reasons:
> - no need to set a natvis file on VSCode or VS for those not using the 
> extension,
> - in case of internal changes for the Qt classes, we could adapt the file and 
> ty it to a specific Qt version,
> - slightly more visible place for people to contribute.
> 
> Another solution, at least better than right now, would be to have a repo for 
> the natvis, that could be used by both the VsTools extension and the VSCode 
> extension.
> Not my best choice, but at least it will give a better visibility to it and 
> reduce the pain to contributions.
> 
> Thoughts?
> 
> Thanks,
> Nicolas
> -- Nicolas Arnaud-Cormos | Senior Software Engineer & Teamlead KDAB (France) 
> S.A.S., a KDAB Group company Tel: France +33 (0)4 90 84 08 53, 
> https://www.kdab.com KDAB - Trusted Software Excellence
> 

-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to