diff --git a/CHANGES b/CHANGES index f199e0ef..8247ec32 100644 --- a/CHANGES +++ b/CHANGES @@ -1400,3 +1400,9 @@ Version history 2025-03-02 version 1.4.0-rc6 * now works with Visual Studio for Windows on ARM64 * installer now supports 4 parallel installations of VS 2022 + +2025-03-09 version 1.4.0 + * added separate version of dbuild.dll linked against Microsoft.Build.CPPTasks.Common for VS 17.14 + * mago: fixed showing intellisense information in tool tip while debugging in VS2022 + * mago: expression evaluator now resolves identifiers of named enumerator types + * full installer now bundled with DMD 2.110.0 and LDC 1.40.0 diff --git a/Makefile b/Makefile index a5ba962f..1d8da39d 100644 --- a/Makefile +++ b/Makefile @@ -183,7 +183,11 @@ dbuild17_12: dbuild17_13: cd msbuild\dbuild && $(MSBUILD) dbuild.csproj /p:Configuration=Release-v17_13;Platform=AnyCPU /t:Rebuild -dbuild17_all: dbuild17_0 dbuild17_1 dbuild17_2 dbuild17_3 dbuild17_4 dbuild17_5 dbuild17_6 dbuild17_7 dbuild17_8 dbuild17_9 dbuild17_10 dbuild17_11 dbuild17_12 dbuild17_13 +dbuild17_14: + cd msbuild\dbuild && $(MSBUILD) dbuild.csproj /p:Configuration=Release-v17_14;Platform=AnyCPU /t:Rebuild + +dbuild17_all: dbuild17_0 dbuild17_1 dbuild17_2 dbuild17_3 dbuild17_4 dbuild17_5 dbuild17_6 dbuild17_7 \ + dbuild17_8 dbuild17_9 dbuild17_10 dbuild17_11 dbuild17_12 dbuild17_13 dbuild17_14 mago: cd ..\..\mago && devenv /Build "Release|Win32" /Project "MagoNatDE" magodbg_2010.sln @@ -247,7 +251,9 @@ $(DCXXFILT_EXE): tools\dcxxfilt.d ################################## # create installer -install_release_modules: install_modules fake_dparser cv2pdb_vs17 mago_vs17 magocc_x64 magocc_arm64 magogc magogc_ldc dbuild12 dbuild14 dbuild15 +install_release_modules: install_modules visuald_vs_arm64 fake_dparser cv2pdb_vs17 \ + mago_vs17 magocc_x64 magocc_arm64 magogc magogc_ldc \ + dbuild12 dbuild14 dbuild15 install_vs: install_release_modules install_only @@ -257,7 +263,7 @@ install_vs_only_vs2017: install_modules dparser dparser_test cv2pdb_vs15 mago_vs install_modules: d_modules vdextension vdext15 visualdwizard dcxxfilt -d_modules: prerequisites visuald_vs visuald_vs_x64 visuald_vs_arm64 vdserver dmdserver +d_modules: prerequisites visuald_vs visuald_vs_x64 vdserver dmdserver appveyor: d_modules cv2pdb_vs16 mago_vs16 magogc diff --git a/README.md b/README.md index 628a9e1b..985f3e3f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is the README file for Visual D, a Visual Studio package providing both project management and language services -Copyright (c) 2010-2019 by Rainer Schuetze, All Rights Reserved +Copyright (c) 2010-2025 by Rainer Schuetze, All Rights Reserved Visual D aims at providing seamless integration of the D programming language into Visual Studio. @@ -61,20 +61,7 @@ Major Features - disassembly view synchronized with source code * Supported Visual Studio versions - - VS 2008 - VS 2019, Community, Professional or Enterprise versions - - Express versions of Visual Studio do not support this - kind of extensions. If you need to use these old version, use the Visual Studio Shell instead: - - VS 2008 Shell: http://www.microsoft.com/en-us/download/details.aspx?id=9771 - - VS 2010 Shell: no longer available - - VS 2012 Shell: http://www.microsoft.com/en-us/download/details.aspx?id=30670 - + http://www.microsoft.com/en-us/download/details.aspx?id=30663 - - If you are using the Visual Studio Shell 2008 or 2010, it misses one file, - that is needed for the conversion of the debug information by cv2pdb. This - is msobj80.dll for VS2008 and msobj100.dll for VS2010 and must be extracted - from a standard installation, the Visual C Express edition or the Windows SDK. - You might also find it installed by other Microsoft products. + - VS 2008 - VS 2022, Community, Professional or Enterprise versions * Includes tools to - convert some idl/h files of the Windows SDK to D diff --git a/VERSION b/VERSION index bdcee320..ae2ed67b 100644 --- a/VERSION +++ b/VERSION @@ -1,5 +1,5 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 4 #define VERSION_REVISION 0 -#define VERSION_BETA -rc -#define VERSION_BUILD 6 +#define VERSION_BETA +#define VERSION_BUILD 0 diff --git a/c2d/cpp2d.d b/c2d/cpp2d.d index 8199a8ba..4c5b23d0 100644 --- a/c2d/cpp2d.d +++ b/c2d/cpp2d.d @@ -673,6 +673,14 @@ string fixNumber(string num) return num[0..$-1]; if(endsWith(num, "L")) return num[0..$-1]; + if(endsWith(num, "ui8")) + return num[0..$-3]; + if(endsWith(num, "ui16") || endsWith(num, "ui32")) + return num[0..$-4]; + if(endsWith(num, "i8")) + return num[0..$-2]; + if(endsWith(num, "i16") || endsWith(num, "i32")) + return num[0..$-3]; return num; } diff --git a/c2d/idl2d.d b/c2d/idl2d.d index f7924c7e..853496a1 100644 --- a/c2d/idl2d.d +++ b/c2d/idl2d.d @@ -147,6 +147,8 @@ class idl2d "dpa_dsa.h", // Win SDK 10.0.18362.0 "fileapifromapp.h", + // Win SDK 10.0.26100.0 + // "intsafe.h", ]) win_idl_files ~= f ~ "*"; // make it optional @@ -580,6 +582,9 @@ class idl2d case "GetLastError": case "MF_END": // defined twice in winuser.h, but said to be obsolete case "__int3264": + case "INT128_MIN": + case "INT128_MAX": + case "UINT128_MAX": return 1; case "_NO_SCRIPT_GUIDS": // used in activdbg.h, disable to avoid duplicate GUID definitions @@ -1282,6 +1287,11 @@ version(all) replaceTokenSequence(tokens, "__VARIANT_NAME_4", "", true); } + if(currentModule == "winbase") + { + replaceTokenSequence(tokens, "#define CopyVolatileMemory$defs\n$defines\n#define ZeroDeviceMemory RtlZeroDeviceMemory\n", "", false); + } + if(currentModule == "windef") { // avoid removal of #define TRUE 1 @@ -1329,6 +1339,8 @@ version(all) "/+ $* +/", true); replaceTokenSequence(tokens, "FORCEINLINE PVOID ReadPointerAcquire $code WritePointerRaw($args) { $code2 }", "/+ $* +/", true); + // win 10.0.26100.0: unused definitions before declaration + replaceTokenSequence(tokens, "#define __NtCurrentTebAddr$def_more\n$defines\n#endif", "#endif", true); } if(currentModule == "commctrl") @@ -1432,6 +1444,11 @@ version(all) { replaceTokenSequence(tokens, "#ifndef INTEROPLIB\n[in] $ifcode\n#else\n$elsecode\n#endif", "[in] $ifcode", false); } + if(currentModule.startsWith("textmgr")) + { + // declaration in textmgr.idl is in enum + replaceTokenSequence(tokens, "#define MAX_FILE_TYPE 24", "", false); + } for(TokenIterator tokIt = tokens.begin(); tokIt != tokens.end; ) { @@ -1983,6 +2000,7 @@ version(all) { replaceTokenSequence(tokens, "__deref_out_xcount_opt($args)", "/+$*+/", true); replaceTokenSequence(tokens, "__deref_opt_out_bcount_full($args)", "/+$*+/", true); replaceTokenSequence(tokens, "__deref_inout_ecount_z($args)", "/+$*+/", true); + replaceTokenSequence(tokens, "_Deref_out_range_($args)", "/+$*+/", true); replaceTokenSequence(tokens, "__field_bcount($args)", "/+$*+/", true); replaceTokenSequence(tokens, "__field_bcount_opt($args)", "/+$*+/", true); replaceTokenSequence(tokens, "__field_ecount($args)", "/+$*+/", true); @@ -2045,6 +2063,8 @@ version(all) { replaceTokenSequence(tokens, "_Outptr_opt_result_bytebuffer_all_($args)", "/+$*+/", true); replaceTokenSequence(tokens, "_Outptr_opt_result_buffer_($args)", "/+$*+/", true); replaceTokenSequence(tokens, "_Releases_exclusive_lock_($args)", "/+$*+/", true); + replaceTokenSequence(tokens, "_Releases_nonreentrant_lock_($args)", "/+$*+/", true); + replaceTokenSequence(tokens, "_Acquires_nonreentrant_lock_($args)", "/+$*+/", true); replaceTokenSequence(tokens, "_Releases_shared_lock_($args)", "/+$*+/", true); replaceTokenSequence(tokens, "_Acquires_exclusive_lock_($args)", "/+$*+/", true); replaceTokenSequence(tokens, "_Acquires_shared_lock_($args)", "/+$*+/", true); diff --git a/doc/StartPage.dd b/doc/StartPage.dd index 751d8590..ed684e5f 100644 --- a/doc/StartPage.dd +++ b/doc/StartPage.dd @@ -85,6 +85,15 @@ $(H2 News) $(P $(LINK2 VersionHistory.html, Full version history and complete details...) ) +2025-03-14 Version 1.4.0 + $(UL + $(LI fixed msbuild integration for VS 2022 17.5 - 17.14) + $(LI now works with Visual Studio for Windows on ARM64) + $(LI dmdserver updated to frontend of DMD 2.110.0, improved completion) + $(LI full installer now bundled with DMD 2.110.0 and LDC 1.40.0) + $(LI for better responsiveness mago debug extension now executes visualizer calls asynchronously) + ) + 2022-10-09 Version 1.3.1 $(UL $(LI fixed memory leak in dmdserver) @@ -99,13 +108,6 @@ $(P $(LINK2 VersionHistory.html, Full version history and complete details...) $(LI full installer now bundled with DMD 2.100.0 and LDC 1.29.0) ) -2022-01-15 Version 1.2.0 - $(UL - $(LI added support for VS 2022) - $(LI dmdserver updated to frontend of DMD 2.098.1) - $(LI full installer now bundled with DMD 2.098.1 and LDC 1.28.1) - ) - $(LINK2 VersionHistory.html, more...) $(H2 Download) diff --git a/doc/VersionHistory.dd b/doc/VersionHistory.dd index 5ca70c8a..a4018e27 100644 --- a/doc/VersionHistory.dd +++ b/doc/VersionHistory.dd @@ -1,5 +1,55 @@ Ddoc +$(H2 2025-03-14 Version 1.4.0) + $(UL + $(LI fixed msbuild integration for VS 2022 17.5 - 17.14) + $(LI now works with Visual Studio for Windows on ARM64) + $(LI dmdserver: + $(UL + $(LI updated to frontend of DMD 2.110.0) + $(LI now slightly less dependent on D runtime by avoiding lowerings) + $(LI fixed some false pointers causing memory leaks) + $(LI pass import paths from prerequisite projects to semantic analysis, too) + $(LI log communication with Visual D to %TEMP%/dmdserver if that folder exists) + $(LI improve completion for member variables, code in switch statement) + $(LI fixed completion for fields/members of class/struct fields) + $(LI added option to display type size and alignment in tool tip) + )) + $(LI mago debugger extension: + $(UL + $(LI fix crash due to changed return values from IDiaSession in VS2022, probably fixes issue #261) + $(LI fixed issue #282: now (mostly) calls __debug* methods asynchronously) + $(LI fixed issue #279: display void[] as ubyte[] in the debugger) + $(LI fixed issue #281: dereference pointer with '.' for arrays, too) + $(LI fixed switching GC for funtion evaluation and adapted it to dmd 2.109) + $(LI fixed display of tuples (currently only with LDC)) + $(LI do not hide __param_.. function arguments as compiler generated symbols) + $(LI fixed showing intellisense information in tool tip while debugging in VS2022) + $(LI expression evaluator now resolves identifiers of named enumerator types) + )) + $(LI language service: + $(UL + $(LI fixed issue 23734: avoid exception by std.file.isDir when clicking a project folder that doesn't exist) + $(LI updated dfmt library from upstream) + $(LI improved message when dmd crashes) + $(LI "add imports from dependent projects" is now evaluated recursively and passed to semantic analysis) + $(LI added support for compiler option -preview=shortenedMethods) + $(LI fixed issue #264: VisualD doesn't run compiled executable, when I select "Compile and Run" option) + $(LI fixed issue #269: avoid BOM in response file if system codepage is UTF-8) + $(LI fixed detecting dmd update after 2.108) + $(LI updated to build with dmd-2.110) + $(LI fixed crash if source window closed before semantic analysis callback completed) + $(LI fixed building with VS 2022) + )) + $(LI installer: + $(UL + $(LI full installer now bundled with DMD 2.110.0 and LDC 1.40.0) + $(LI installer now supports 4 parallel installations of VS 2022) + $(LI project template cache now removed if Visual D does not find itself in it. Workaround for issue #256) + $(LI fixed some version inaccuracies in installation files) + )) + ) + $(H2 2022-09-10 Version 1.3.1) $(UL $(LI full installer now bundled with DMD 2.100.2 and LDC 1.30.0) diff --git a/doc/visuald.ddoc b/doc/visuald.ddoc index b0ced1b5..aab6841c 100644 --- a/doc/visuald.ddoc +++ b/doc/visuald.ddoc @@ -1,73 +1,73 @@ -VERSION = 1.3.1 -DMD_VERSION = 2.100.2 -LDC_VERSION = 1.30.0 -ROOT_DIR = https://www.dlang.org/ -ROOT = https://www.dlang.org -BODYCLASS = visuald -PROJECT = visuald -WIKI = visuald -SELF_PATH = -LAYOUT_SUFFIX= - +VERSION = 1.4.0 +DMD_VERSION = 2.110.0 +LDC_VERSION = 1.40.0 +ROOT_DIR = https://www.dlang.org/ +ROOT = https://www.dlang.org +BODYCLASS = visuald +PROJECT = visuald +WIKI = visuald +SELF_PATH = +LAYOUT_SUFFIX= + VDLINK=$(LINK2 $1.html, $2) IMG = -IMG_CENTER =
-TABLE_NOBORDER = $0
-_= -MENU_W_SUBMENU_OPEN =
  • $0 - -SUBNAV=$(SUBNAV_TEMPLATE - $(SUBNAV_HEAD Visual D $(VERSION), StartPage.html, Home, subnav-duplicate) - $(UL - $(MENU StartPage.html, Home) - $(MENU https://github.com/dlang/visuald/releases, Downloads) - $(MENU Installation.html, Installation) - $(MENU_W_SUBMENU_OPEN Tour) - $(SUBMENU - Features.html, Feature List, - GlobalOptions.html, Global Options, - ProjectWizard.html, Project Wizard, - Editor.html, Editor, - Search.html, Search Window, - TokenReplace.html, Token Replace, - ProjectConfig.html, Project Config, - vcxproject.html, VC Project Integration, - CppConversion.html, C++ to D, - Debugging.html, Debugging, - CompileCommands.html, Compile Commands, - Profiling.html, Profiling, - Coverage.html, Code Coverage, - DustMite.html, DustMite Integration, - BrowseInfo.html, Browse Info - ) - $(MENU VersionHistory.html, Version History) - $(MENU KnownIssues.html, Known Issues) - $(MENU BuildFromSource.html, Building from Source) - ) -) -_= - -D_S = $(LAYOUT ,$1,$(ARGS $+)) -SPEC_S = $(LAYOUT ,$1,$(ARGS $+)) -COMMUNITY= $(LAYOUT ,$1,$(ARGS $+)) -_= - -LAYOUT=$3 -_= - -SFINAE=$(GLOSSARY sfinae, $(ACRONYM SFINAE, Substitution Failure Is Not An Error)) -OBJ2ASM=$(HTTP digitalmars.com/ctg/obj2asm.html, obj2asm) -DUMPOBJ=$(HTTP digitalmars.com/ctg/dumpobj.html, dumpobj) -SHELL=$(HTTP digitalmars.com/ctg/shell.html, shell) -_= - -VISUALD = https://rainers.github.io/visuald/visuald/StartPage.html -_= - -AMAZONLINK= $(WEB amazon.com/exec/obidos/ASIN/$1/classicempire, $+) -_= - -_= - -MIDRULE= -_= +IMG_CENTER =
    +TABLE_NOBORDER = $0
    +_= +MENU_W_SUBMENU_OPEN =
  • $0 + +SUBNAV=$(SUBNAV_TEMPLATE + $(SUBNAV_HEAD Visual D $(VERSION), StartPage.html, Home, subnav-duplicate) + $(UL + $(MENU StartPage.html, Home) + $(MENU https://github.com/dlang/visuald/releases, Downloads) + $(MENU Installation.html, Installation) + $(MENU_W_SUBMENU_OPEN Tour) + $(SUBMENU + Features.html, Feature List, + GlobalOptions.html, Global Options, + ProjectWizard.html, Project Wizard, + Editor.html, Editor, + Search.html, Search Window, + TokenReplace.html, Token Replace, + ProjectConfig.html, Project Config, + vcxproject.html, VC Project Integration, + CppConversion.html, C++ to D, + Debugging.html, Debugging, + CompileCommands.html, Compile Commands, + Profiling.html, Profiling, + Coverage.html, Code Coverage, + DustMite.html, DustMite Integration, + BrowseInfo.html, Browse Info + ) + $(MENU VersionHistory.html, Version History) + $(MENU KnownIssues.html, Known Issues) + $(MENU BuildFromSource.html, Building from Source) + ) +) +_= + +D_S = $(LAYOUT ,$1,$(ARGS $+)) +SPEC_S = $(LAYOUT ,$1,$(ARGS $+)) +COMMUNITY= $(LAYOUT ,$1,$(ARGS $+)) +_= + +LAYOUT=$3 +_= + +SFINAE=$(GLOSSARY sfinae, $(ACRONYM SFINAE, Substitution Failure Is Not An Error)) +OBJ2ASM=$(HTTP digitalmars.com/ctg/obj2asm.html, obj2asm) +DUMPOBJ=$(HTTP digitalmars.com/ctg/dumpobj.html, dumpobj) +SHELL=$(HTTP digitalmars.com/ctg/shell.html, shell) +_= + +VISUALD = https://rainers.github.io/visuald/visuald/StartPage.html +_= + +AMAZONLINK= $(WEB amazon.com/exec/obidos/ASIN/$1/classicempire, $+) +_= + +_= + +MIDRULE= +_= diff --git a/msbuild/dbuild/dbuild.csproj b/msbuild/dbuild/dbuild.csproj index 3d5cddde..5c2710ef 100644 --- a/msbuild/dbuild/dbuild.csproj +++ b/msbuild/dbuild/dbuild.csproj @@ -423,6 +423,28 @@ MinimumRecommendedRules.ruleset 17.13 + + bin\Release-v17_14\ + TRACE;TOOLS_V17 + true + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + 17.14 + + + bin\Debug-v17_14\ + TRACE;DEBUG;TOOLS_V17 + true + false + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + 17.14 + true full @@ -466,9 +488,12 @@ v4.6 v4.5.2 v4.7.2 - v4.7.2 + v4.7.2 false false false @@ -699,9 +724,12 @@ - + assemblies\v17\Microsoft.Build.dll @@ -799,6 +827,11 @@ assemblies\v17_13\Microsoft.Build.CPPTasks.Common.dll + + + assemblies\v17_14\Microsoft.Build.CPPTasks.Common.dll + + Designer diff --git a/msbuild/dcompile_defaults.props b/msbuild/dcompile_defaults.props index e868bd2c..8080adce 100644 --- a/msbuild/dcompile_defaults.props +++ b/msbuild/dcompile_defaults.props @@ -47,8 +47,8 @@ $(MSBuildVersion_Major).0 16.0 16.1 - 17.$(MSBuildVersion_Minor) - 17.13 + 17.$(MSBuildVersion_Minor) + 17.14 diff --git a/nsis/visuald.nsi b/nsis/visuald.nsi index a223a3b4..0a84c8a0 100644 --- a/nsis/visuald.nsi +++ b/nsis/visuald.nsi @@ -29,12 +29,12 @@ ; define DMD source path to include dmd installation ; !define DMD -!define DMD_VERSION "2.109.1" +!define DMD_VERSION "2.110.0" !define DMD_SRC c:\d\dmd-${DMD_VERSION} ; define LDC to include ldc installation ; !define LDC -!define LDC_VERSION "1.39.0" +!define LDC_VERSION "1.40.0" !define LDC_SRC c:\d\ldc2-${LDC_VERSION}-windows-multilib ; define VS2019 to include VS2019 support @@ -354,6 +354,7 @@ Section "Visual Studio package" SecPackage ${File} ..\msbuild\dbuild\obj\release-v17_11\ dbuild.17.11.dll ${File} ..\msbuild\dbuild\obj\release-v17_12\ dbuild.17.12.dll ${File} ..\msbuild\dbuild\obj\release-v17_13\ dbuild.17.13.dll + ${File} ..\msbuild\dbuild\obj\release-v17_14\ dbuild.17.14.dll !endif WriteRegStr HKLM "Software\${APPNAME}" "msbuild" $INSTDIR\msbuild !endif @@ -2097,12 +2098,14 @@ Function InstallForVS2022 !insertmacro ReplaceInFile "$1${EXTENSION_DIR}\extension.vsixmanifest" "VDVERSION" "${VERSION_MAJOR}.${VERSION_MINOR}" NoBackup !ifdef MAGO + ; remove old DLL, now in x64\ + Delete "$1..\Packages\Debugger\MagoNatCC.dll" ${SetOutPath} "$1..\Packages\Debugger\x64" ${File} ${MAGO_SOURCE}\bin\x64\Release\ MagoNatCC.dll - ${File} ${MAGO_SOURCE}\bin\x64\Release\ MagoNatCC.vsdconfig ${SetOutPath} "$1..\Packages\Debugger\arm64" ${File} ${MAGO_SOURCE}\bin\ARM64\Release\ MagoNatCC.dll - ${File} ${MAGO_SOURCE}\bin\ARM64\Release\ MagoNatCC.vsdconfig + ${SetOutPath} "$1..\Packages\Debugger" + ${File} ${MAGO_SOURCE}\bin\x64\Release\ MagoNatCC.vsdconfig !endif ${SetOutPath} "$1\PublicAssemblies" diff --git a/sdk/port/base.d b/sdk/port/base.d index 33487dba..27dc118d 100644 --- a/sdk/port/base.d +++ b/sdk/port/base.d @@ -87,6 +87,8 @@ alias DWORD OLE_COLOR; alias bool boolean; alias ulong uint64; +enum DWORD_MAX = 0xffffffffU; // instead of intsafe.d + version(sdk) {} else { alias double DOUBLE; diff --git a/sdk/vsi.visualdproj b/sdk/vsi.visualdproj index 9e70d20d..797822a9 100644 --- a/sdk/vsi.visualdproj +++ b/sdk/vsi.visualdproj @@ -2748,6 +2748,7 @@ + @@ -2773,6 +2774,11 @@ + + + + + diff --git a/visuald/dpackage.d b/visuald/dpackage.d index 2f1f0a39..49e43120 100644 --- a/visuald/dpackage.d +++ b/visuald/dpackage.d @@ -1649,6 +1649,7 @@ class GlobalOptions int vsVersion; bool isVS2017OrLater() { return vsVersion >= 15; } + bool isVS2022OrLater() { return vsVersion >= 17; } bool usesUpdateSemanticModule() { return parseSource || showParseErrors || expandFromSemantics || showTypeInTooltip || semanticGotoDef; } bool usesQuickInfoTooltips() { return isVS2017OrLater(); } diff --git a/visuald/viewfilter.d b/visuald/viewfilter.d index 818662d9..46e0175b 100644 --- a/visuald/viewfilter.d +++ b/visuald/viewfilter.d @@ -1846,6 +1846,9 @@ else if(!src.GetTipSpan(pSpan)) return resFwd; + IVsDebugger srpVsDebugger = queryService!(IVsDebugger); + scope(exit) release(srpVsDebugger); + // retrieve last identifier in span int startIdx, endIdx; if(src.GetWordExtent(pSpan.iEndLine, pSpan.iEndIndex - 1, WORDEXT_CURRENT, startIdx, endIdx)) @@ -1877,10 +1880,8 @@ else // when implementing IVsTextViewFilter, VS2010 will no longer ask the debugger // for tooltips, so we have to do it ourselves - if(IVsDebugger srpVsDebugger = queryService!(IVsDebugger)) + if(srpVsDebugger) { - scope(exit) release(srpVsDebugger); - HRESULT hr = srpVsDebugger.GetDataTipValue(src.mBuffer, pSpan, null, pbstrText); if(hr == 0x45001) // always returned when debugger active, so no other tooltips then { @@ -1915,7 +1916,21 @@ version(none) // quick info tooltips not good enough yet } *pbstrText = allocBSTR(msg); } - if(Package.GetGlobalOptions().showTypeInTooltip && !Package.GetGlobalOptions().usesQuickInfoTooltips()) + auto opts = Package.GetGlobalOptions(); + if (opts.isVS2022OrLater() && srpVsDebugger) + { + // VS 2022 shows both the text here and the one from QuickInfo, but none if this + // one is empty. Without forwarding directly here, some hovering is necessary + // to show the tooltip + DBGMODE mode; + if (srpVsDebugger.GetMode(&mode) == S_OK && (mode & ~DBGMODE_EncMask) != DBGMODE_Design) + { + *pbstrText = allocBSTR("QuickInfo:"); + *pSpan = mTipSpan; + return S_OK; + } + } + if(opts.showTypeInTooltip && !opts.usesQuickInfoTooltips()) { if(mPendingSpan == span && mTipRequest == mPendingRequest) {