Re: Cannot evaluate expression. WTF?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Rüdiger,

While I am not sure why this is happening, I wouldn't recommend using
Console.WriteLine. Try Debug.WriteLine, as those statements will be
stripped in a release compile.

Make sure you are doing a build before you run the debugger as well.

Hope this helps,


Steve - dotneticated.com

"Rüdiger Klaehn" <rudi@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:1189590434.552285.149140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi everybody,

I have a major problem when working with VS.NET 2005 debugger on large
projects. Very often, the debugger is not able to evaluate any watch
expressions for no apparent reasons.

The code is compiled in debug mode, and all I want to do is to
evaluate some expression at a normal break point. No Exceptions,
Assertions or Stack overflows are involved.

The project in question is quite large and contains some constructs
like classes that are inner classes of other classes with type
parameters, like this:

class A<T> {
class B {
}
}

I had this happening whenever projects exceed a certain size or
complexity. But having a debugger that only works for Hello World
sized projects does not do me any good.

Is there any solution to this problem? I am back to littering the code
with Console.WriteLine statements because of this. My system is a quad
core with 4GB of ram, so it is obviously not a performance problem.
And no, reinstalling VS.NET is not a solution. I had this happening on
multiple machines. When I reinstall, it will probably work OK for a
few days, and then break again. I am not going to reinstall VS.NET
every two days!

By the way: I had this happen with many technologies like designers
and code generators that are supposed to make the developing process
easier. They always work just fine for tiny test projects, but once
you rely on them for large real world projects they break down at the
worst possible moment.

any help would be greatly appreciated,

Rüdiger Klaehn


.



Relevant Pages

  • Cannot evaluate expression. WTF?
    ... I have a major problem when working with VS.NET 2005 debugger on large ... the debugger is not able to evaluate any watch ... expressions for no apparent reasons. ... I am not going to reinstall VS.NET ...
    (microsoft.public.vsnet.debugging)
  • Re: AWS issue
    ... Debugger for ada is not installed, so I can run the debugger, but the only answer I get is exit code 01. ... So I compile a single file with this function and link with all that stuff. ... At a glance it seems like you are missing -gnat05 in the compile command so you get and Ada95 compiler instead of Ada compiler. ... I've got two problems on AWS, hope there is some aws 2.3 users here. ...
    (comp.lang.ada)
  • Re: Compilator Fortran
    ... To facilitate compilation for the Windowed Debugger ... REM Invoke the debugger if compile and link went ok. ... This will compile, link, and invoke the windowed debugger. ...
    (comp.lang.fortran)
  • Re: compiler errors
    ... compile a program that I downloaded from the net and keep getting a ... What is a DBG File and how do I set up the compiler to so I won't get ... debugging information necessary to do source code step-by-step ... The debugger is just warning you that it can't find the ...
    (microsoft.public.dotnet.languages.vc)
  • Re: unexplainable behaviour - f90 - looking for some tools to help diagnose
    ... using a debugger can help. ... But you should compile again your code with -g option and depending on the previous option used your code can run because of different layout of the datas in memory. ... If it fails (memory fault, segmentation fault) use the where command of the debugger to see where you are in the code.... ... I'm using CVS to store successive versions of my codes, but even if I can see exactly what has changed I do not undestand why I have a memory fault! ...
    (comp.lang.fortran)