Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1035069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:29:26+00:00 2026-05-16T14:29:26+00:00

Using Visual Studio, after attaching to a Process and pressing Pause (Break-All), you switch

  • 0

Using Visual Studio, after attaching to a Process and pressing Pause (Break-All), you switch to the desired thread and use the Quick Watch window to check out some data, say

MySingletonClass.Instance.Data

Sometimes I either get this:

Cannot evaluate expression because the current thread is in a sleep, wait, or join

or this (when trying to view certain properties of the data):

Cannot evaluate expression because a native frame is on top of the call stack.

Quite frankly, I don’t care, I just want to see the data! I know there are various ways to get around this, namely:

  1. Setting a breakpoint on the thread and waiting till it gets hit (cumbersome, not always possible)
  2. Taking a dump of the process and loading back into VS (even then I still get the 2nd error)
  3. windbg

Given you could see this data if you presumably used windbg why is it we all can’t take advantage of the much easier and prettier VS to inspect objects when attaching to a process?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:29:27+00:00Added an answer on May 16, 2026 at 2:29 pm

    Why can’t we do this? We can’t do this because the Visual Studio watch window doesn’t just retrieve data from memory and display it. It actually executes managed code (that’s what it means by “evaluate the expression”). In particular, it almost always executes the ToString() method to display the user-readable result.

    The crux is that it executes this code within the process/thread you are debugging. This ensures that the expression evaluates the same way it would if it were actually in the code you are debugging. This leaves the downside that it can only be executed in between managed instructions, but not while native code is active, and not in a blocked thread.

    What can we do about it? If you are actually debugging a managed application, and you are in a native stackframe, just press F10 or Shift+F11 repeatedly until you are back in managed code. Then you can evaluate expressions. However, for fully-native processes, and for threads in a blocked state, I am not aware of any workaround.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Give them unique IDs <li><a id="someID" href="#" class="icon-s icon-s2">Restaurant</a></li> <li><a… May 16, 2026 at 4:31 pm
  • Editorial Team
    Editorial Team added an answer Yes, it is possible. https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5331883.html Has some information on it.… May 16, 2026 at 4:31 pm
  • Editorial Team
    Editorial Team added an answer It's best not to think of the unchecked or checked… May 16, 2026 at 4:31 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have created a setup project using Visual Studio 2008. After the application is
I've just started using ReSharper with Visual Studio (after the many recommendations on SO).
After compiling a simple C++ project using Visual Studio 2008 on vista, everything runs
I am using Visual studio 2008 in Windows 7. After an ajax call, I
I'm using Visual Studio 2010 RC. Would it be possible that after doing my
I'm using Visual Studio 2008 on a 64-bit version of Vista. After my program
I've been using Visual Studio Express for a good while now, but after comparing
After learning about how to print out debug messages using Visual Studio's Tracepoint feature,
When using Visual Studio 2008 or 2010, every time you attach to IIS w3wp.exe
I am using Microsoft Visual Studio Professional 2010. (Also SQL Management Studio for my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.