Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008: how to pause the running program to see a variable value?

I have started a long loop, and i dont want to start it over (been running 3 hours now, i calculated it to run only 1 hour instead), and i am afraid that my program is working incorrectly because its taking so long. I was too stupid to actually output any state values for myself (i didnt think it would take 3 damn hours).

So, is there some way to spy one specific variable value while the program was launched from visual studio in "Release" mode?

like image 709
Rookie Avatar asked May 16 '11 18:05

Rookie


1 Answers

What you want to do is attach to the running process

  • Load the solution which represents the project
  • Tools -> Attach to Process
  • Select the running process and hit attach
  • Hit the Pause Button on the IDE to stop the process or set a break point

At this point you will be broken in the debugger and able to inspect the running program

like image 113
JaredPar Avatar answered Sep 30 '22 13:09

JaredPar