Is the difference between Visual Studio launching an executable file and running it yourself?

I am working on an application in C # 4.0 (VS2010), and I have a very strange situation. An error is reported to me from the whole team, and I can’t always reproduce it until one of the other developers tells me to double-click the executable file and follow the error script, and not run it from VS2010.

After some research, I found that most of the comments on this issue relate to uninitialized heap memory and the like, but in the context of C ++. I know that C # throws an error, not a warning, if the variable remains uninitialized, so this is most likely not a problem.

Both assemblies are the same on my machine and users, and now I know that pressing F5 (starting with debugging) does not create a problem, while Ctrl + F5. Thus, the question is not the difference between them (other issues have already been considered), but rather: how to attach the debugger to the C # process to its behavior ?!

The code creates a network connection.

+5
source share
1 answer

So the question is: how to attach a debugger to a C # process to its behavior ?!

In every way. This affects JIT optimization, garbage collection, time (race conditions), everything that is clearly trying to determine if it works in the debugger, and possibly the type order and time of initialization.

, , - , , , .

+7

All Articles