DataTips appear broken in Visual Studio 2019 after attaching to a process when working on a 2nd display

Jeffrey O 11 Reputation points
2021-01-08T00:25:27.983+00:00

small program, test.c, which reads:

include <stdio.h>

int main() {
int x,y;

x = 1;
printf("hello, world from pid %d\n",GetCurrentProcessId());
Sleep(30*1000);
for (y=x; y < 10; y++)
printf("%d ",y);
printf("\nThat's all folks\n");
}

and I build it with "cl test.c /Zi", if I run it in VS2019 with "devenv /debugexe test.exe" then I can hover over the variables x and y and see their values (hovering over the printf function displays info about it as well). However if I run it from the console prompt and then start VS2019 as an adminstrator and use Debug->Attach to attach to the process and then Debug->Break, hovering over things no longer displays any information. If I do the same thing in VS2013, hovering over the variables displays their values.

This is using a laptop with an external monitor attached and with VS 2019 on the external monitor. If I move VS2019 to the laptop display, then the datatips show up and I can see the value of variables when I hover over them.

The original problem (at our company) was reported by someone running Windows in a VM on OS/X. I'm running Windows on "bare metal" (Dell laptop) but it seems in both cases, there's some interaction with the display going on.

VS2013 works properly in both situation (either of my screens or in the VM under OS/X).

Developer technologies | Visual Studio | Debugging
{count} vote

5 answers

Sort by: Most helpful
  1. Jeffrey O 11 Reputation points
    2021-01-13T13:36:22.737+00:00

    @Dylan Zhu-MSFT Ok, I think I've found the cause of the trouble - it relates to the scaling settings for the displays. My 2 monitors have different resolutions. My laptop display is 3840x2160)and my external monitor is set to 2560X1440 so I have the scaling set to 100% on the external monitor and at 200% on the laptop display (I extend my desktop across them - the laptop is display #1).

    If I set the scaling factor on my external display to 200% to match the primary display, then the datatips start appearing as I hover over things. I bet the presentation layer code is picking up settings from the primary display on the system rather than the current display it is running on (or something like that).

    This problem started from someone running VS2019 on a MacBook in a Windows VM and I suspect there is some similar display setting mismatch in that environment.

    None of this happens in VS2013.

    After repairing the install I noticed a problem with the menus related to setting options (I had to reset my debugging symbol setting). Under Debug->Options and Settings as I click through the left hand column of options, sometimes the window on the right doesn't update or sometimes it displays as blank. Again, if I move VS2019 to my primary display, then it works fine. Here's what one of them looks like where the right hand window is blank:
    56139-image.png
    If I click somewhere else in the left panel and then come back to this one, it might show up, or it might take a couple of tries. In VS2013, this problem doesn't exist.

    1 person found this answer helpful.

  2. Dylan Zhu-MSFT 6,426 Reputation points
    2021-01-08T03:37:53.057+00:00

    Hi JeffreyOrlin,

    Please try to set some breakpoints in your code, which will help break the debugger when the code will be executed.
    54626-image.png

    Best Regards,
    Dylan


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our **documentation to enable e-mail notifications if you want to receive the related email notification for this thread.**


  3. Maybecompletelyw_0 281 Reputation points
    2021-01-08T14:09:46.393+00:00

    Sorry cannot reproduce with VS Version 16.8.3.
    With my 'Debug->Options...', e.g. looks like this, when in
    ntdll.dll!_NtDelayExecution@8 ()
    54817-intellisense.jpg


  4. Maybecompletelyw_0 281 Reputation points
    2021-01-08T15:25:59.17+00:00

    Yes, I am attaching, how I start VS does not make a difference.

    Microsoft Visual Studio Community 2019
    Version 16.8.3
    VisualStudio.16.Release/16.8.3+30804.86
    Microsoft .NET Framework
    Version 4.8.04084
    Installed Version: Community
    Visual C++ 2019 00435-60000-00000-AA572
    Microsoft Visual C++ 2019
    ASP.NET and Web Tools 2019 16.8.554.20160
    ASP.NET and Web Tools 2019
    C# Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
    C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
    Debugging Tools for Windows 10.0.19030.1000
    Integrates the Windows Debugger functionality (http://go.microsoft.com/fwlink/?linkid=223405) in Visual Studio.
    IntelliCode Extension 1.0
    IntelliCode Visual Studio Extension Detailed Info
    Microsoft JVM Debugger 1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
    Microsoft MI-Based Debugger 1.0
    Provides support for connecting Visual Studio to MI compatible debuggers
    Microsoft Visual C++ Wizards 1.0
    Microsoft Visual C++ Wizards
    Microsoft Visual Studio VC Package 1.0
    Microsoft Visual Studio VC Package
    NuGet Package Manager 5.8.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
    ProjectServicesPackage Extension 1.0
    ProjectServicesPackage Visual Studio Extension Detailed Info
    Test Adapter for Boost.Test 1.0
    Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
    Test Adapter for Google Test 1.0
    Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
    Visual Basic Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
    Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
    Visual Studio Code Debug Adapter Host Package 1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
    Visual Studio Tools for CMake 1.0
    Visual Studio Tools for CMake
    Windows Driver Kit 10.0.19030.1000
    Headers, libraries, and tools needed to develop, debug, and test Windows drivers (msdn.microsoft.com/en-us/windows/hardware/gg487428.aspx)

    0 comments No comments

  5. Jeffrey O 11 Reputation points
    2021-01-08T19:14:59.507+00:00

    Ok, turns out its got something to do with the display.

    I'm running a laptop with an external monitor. If I move the VS2019 window to my laptop display, then I can hover over things and the info pops up (function info, values of variables, etc). If I move the VS2019 window to my external monitor, they do not. So its something about the combination of attaching to a process and having the VS2019 window on my external monitor which causes this not to work.

    This was originally reported to me by someone I work with running Windows in a VM under OS/X (where it used to work with VS2013).


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.