|
-
October 13th, 2009, 08:06 PM
#1
Code update not working
Hi,
I have C# windows form project in VS-2008. It is fine when I run it in debug mode for the first time. Next time onwards, the program does not hit break points and any code update does not reflect in the new form being shown. Even if I comment certain lines of code, the program runs as in the way prior to editing the code.
Then I found that the same is the case with any new project I create.
I am lost.
Could any one please help me?
-
October 14th, 2009, 01:19 AM
#2
Re: Code update not working
-
October 14th, 2009, 01:48 AM
#3
Re: Code update not working
I have a query on similar lines - i am not able to edit my code when i run my program in debug mode.. only when i hit the break point in the code it am able to edit the code but not always .. ?
how to make edit the code at all the times? any idea how to change the settings?
-
October 14th, 2009, 02:11 AM
#4
Re: Code update not working
 Originally Posted by vcdebugger
I have a query on similar lines - i am not able to edit my code when i run my program in debug mode.. only when i hit the break point in the code it am able to edit the code but not always .. ?
how to make edit the code at all the times? any idea how to change the settings?
Why do you want to edit your code while an application is running? Does it really need?
-
October 14th, 2009, 03:41 AM
#5
Re: Code update not working
 Originally Posted by vcdebugger
I have a query on similar lines - i am not able to edit my code when i run my program in debug mode.. only when i hit the break point in the code it am able to edit the code but not always .. ?
how to make edit the code at all the times? any idea how to change the settings?
No, that won't work 
If that was possible, you'd never be able to run your project, as it keeps on changing, and then needs to be built again after each change This feature wasn't even available in VS 2003 and before, only since 2005, it came back so that we can edit the code in debug mode.
-
October 14th, 2009, 03:52 AM
#6
Re: Code update not working
 Originally Posted by Nikitozz
Why do you want to edit your code while an application is running? Does it really need?
yup, when you run your application and observe that somethings are not running as per your expectation you think of changing the code , but you are not able to edit the code at this point of time - then you need to close your application and then change ytou code and then do a build.
but suppose think if you hit a break point in your code and it allows you to edit the code and when you do F10( Next step-in) it wont close your application but it will Apply the code changes then and there itself and this saves lot of over head of closing your application and running once again.
so what my doubt is if it allows you to edit your code when you hit a break point why not other times ? and also this feature helpd you if your application is huge and has lot of features which you wont remember when you close you application.. but by seeing your application running you are very much keen on the code changes...
-
October 14th, 2009, 03:56 AM
#7
Re: Code update not working
 Originally Posted by HanneSThEGreaT
No, that won't work
If that was possible, you'd never be able to run your project, as it keeps on changing, and then needs to be built again after each change  .
hmmm.. currently i am using VS.NET 2008 version, in this if i make changes to code during debug mode when it hits a break point and when i say F10( step next) it does not close the application and builds fresh but i applys the code changes from where it was and process further with the code execution..
 Originally Posted by HanneSThEGreaT
This feature wasn't even available in VS 2003 and before, only since 2005, it came back so that we can edit the code in debug mode.
hmm.. I still remember that it was possible to change the code in Visual Studio 6.0 ( VC++ ) compiler ( not the VS.NET studio) during 2001-2002 time..... not 100 % sure though ;-)
-
October 14th, 2009, 04:23 AM
#8
Re: Code update not working
 Originally Posted by vcdebugger
hmmm.. currently i am using VS.NET 2008 version, in this if i make changes to code during debug mode when it hits a break point and when i say F10( step next) it does not close the application and builds fresh but i applys the code changes from where it was and process further with the code execution..
And that is how it should work, as I said. You must be in Break mode inorder to make changes. How you phrased your question gave me the impression you want to be able to type and build the whole time from anywhere 
The only ways you can build your program is by clicking the Build command etc., or in debug mode. If you try to make changes to a running program, it will not work otherwise 
 Originally Posted by vcdebugger
hmm.. I still remember that it was possible to change the code in Visual Studio 6.0 ( VC++ ) compiler ( not the VS.NET studio) during 2001-2002 time..... not 100 % sure though ;-)
Yes, it was indeed possible with VC++ 6, I know, even with VB 6. But for some strange reason, that feature was only implemented in .NET from 2005 onwards
-
October 15th, 2009, 07:23 AM
#9
Re: Code update not working
 Originally Posted by Nikitozz
Thanks....
but actually the problem was that there was an error in the code, which was not being attended to. I had earlier set that the code should run even if there is an error..... I changed it and things are OK now.... Thanks for the responses....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|