K
Kousik Chatterjee
Hi Robert,
I recently came across the same problem. I am not able to debug parts of the code when I attach my visual studio debugger to an already launched process.
Did you find a way to get across it ? Do I need to modify the build settings for the particular assembly to solve the problem ?
Thanks and Regards,
Kousik
-----------------
03-Apr-07 02:30:25
I did not mention an important detail (since I didn't think that it
matters). I attach to the process that references my assembly after
the process is started. When I do not attach visual studio to the
process but instead start the process directly from vs by hitting F5 I
infact am able to debug. Also note that the probelm with "Cannot
evaluate expression because the code of the current method is
optimized." only happens with the one project. The sourcecode of all
other projects in the same solution can be debugged just fine no
matter if I attach later or start the process with F5.
What does this hint? How could I narrow the source of this evil down?
Does it have to do something with the visual studio hosting process
(wich only is used when starting the process with F5) ? Or could it
have to do with the working folder or the loaded symbols?
----------------
I recently came across the same problem. I am not able to debug parts of the code when I attach my visual studio debugger to an already launched process.
Did you find a way to get across it ? Do I need to modify the build settings for the particular assembly to solve the problem ?
Thanks and Regards,
Kousik
-----------------
03-Apr-07 02:30:25
I did not mention an important detail (since I didn't think that it
matters). I attach to the process that references my assembly after
the process is started. When I do not attach visual studio to the
process but instead start the process directly from vs by hitting F5 I
infact am able to debug. Also note that the probelm with "Cannot
evaluate expression because the code of the current method is
optimized." only happens with the one project. The sourcecode of all
other projects in the same solution can be debugged just fine no
matter if I attach later or start the process with F5.
What does this hint? How could I narrow the source of this evil down?
Does it have to do something with the visual studio hosting process
(wich only is used when starting the process with F5) ? Or could it
have to do with the working folder or the loaded symbols?
----------------