VS 2019 Debugger returns Unable to perform function evaluation on the process being debugged error on any Watch.

Paul Sander 1 Reputation point
2022-02-03T19:22:23.807+00:00

I'm attempting to debug a VB function in a Winform app with VS2019 in a project that was recently migrated from VS2010. I had no problems with Watches in VS2010 - the problem has only cropped up since upgrading to VS2019. I get the following on anything that isn't a static variable:

171070-image.png

Any feedback would be appreciated.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,821 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
935 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 47,711 Reputation points
    2022-02-03T19:28:15.75+00:00

    The additional info indicates optimizations so are you building your solution with the Debug configuration? If not then you need to build using debug settings otherwise the debugger won't be able to show you anything useful.

    Also note that this can happen if you are trying to view something that requires code to execute (aka a property) and that code requires that the debugger run other code (hence the thread info in the message).