Click to See Complete Forum and Search --> : Code update not working
GeoNav
October 13th, 2009, 08:06 PM
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?
Nikitozz
October 14th, 2009, 01:19 AM
Try to see this:
http://www.codeguru.com/forum/showthread.php?t=486298
vcdebugger
October 14th, 2009, 01:48 AM
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?
Nikitozz
October 14th, 2009, 02:11 AM
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?
HanneSThEGreaT
October 14th, 2009, 03:41 AM
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.
vcdebugger
October 14th, 2009, 03:52 AM
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...
vcdebugger
October 14th, 2009, 03:56 AM
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..
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 ;-)
HanneSThEGreaT
October 14th, 2009, 04:23 AM
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 :)
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 :)
GeoNav
October 15th, 2009, 07:23 AM
Try to see this:
http://www.codeguru.com/forum/showthread.php?t=486298
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....
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.