Asked by:
How to handle Visual studio code executes twice after deployment (run time )

-
Hi All,
My Visual studio code giving results twice. I think it is executing twice after deployment.
When I tried to dedug the code the same line of code is running twice . The message shows "The process or thread has changed since the last step"
I figured out the issue, the thread is running multiple times. If I freeze one of the same thread it gives me 1 result.(which is correct). However, this is done while debugging the code.
How to handle the same after deployment of code(run time).Can anyone please help me out.
Question
All replies
-
-
I figured out the issue, the thread is running multiple times. If I freeze one of the same thread it gives me 1 result.(which is correct). However, this is done while debugging the code.
Then your program is buggy. You need to fix it, not deploy it.
The issue is not always.
-
The issue is not always.
- Edited by Brian Muth Thursday, April 06, 2017 9:49 PM spelling
-
Hi Sri2108,
I agree with Brian Muth, first, you need to check you code to find the reason. For example, when we develop a Web form and placed the initialization code in the Page_Load() method of the form, then attached this method to the Load event of web form, in this case, the Page_Load() method will be excuting twice in stead of once.
Besides, if you use avast, try to disable Avast DeepScreen, then check if it works fine. (go into settings -> antivirus -> un-check DeepScreen).
Hope this can help you.
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
- Proposed as answer by Leo Liu-MSFTMicrosoft contingent staff Tuesday, April 11, 2017 1:41 AM