开发者

Editing VB.net code without stopping executable

开发者 https://www.devze.com 2023-02-25 16:47 出处:网络
I need to be able to edit vb.net code using visual studio without stopping the debugging executable. How can I go about doing this? If it\'s impossible, how can I code and reload that code without st

I need to be able to edit vb.net code using visual studio without stopping the debugging executable.

How can I go about doing this? If it's impossible, how can I code and reload that code without stopping the executable? I know of scripting languages like Lua, but I fear the imple开发者_运维技巧mentation of another language within the VB is unnecessary to save me the trouble of stopping the executable.

The issue is that starting and stopping this executable can take a very long time, and I need to be able to edit the code quickly and frequently.


I think you're talking about "Edit and Continue" which can be enabled in VS2010 > Tools > Debugging > Edit and Continue.

Note: the application must be in "break" mode to enable editing. When you talk about "Stopping the executable" do you mean stopping all debugging or stopping at a breakpoint?


Edit + Continue has been supported since VS2005. It won't work by default when you run on a 64-bit operating system, only 32-bit code is supported. Easy fix: Project + Properties, Compile tab, scroll down, Advanced Compile Options, change the Target CPU combobox to "x86". That's the default now for new projects created in VS2010.

Not every type of code change is supported by E+C, details are in this MSDN Library page.


Its easy, Edit and Continue is supported from VS1.1 up. The trick is placing a breakpoint in your code by clicking the left margin of a code window on a line of code you wish to halt the program. You will need to run the program in Debug mode (not release mode).

Tip you can also press Ctrl + Alt + PauseBreak to halt the program in the middle of a lengthy operation.

Once the programs Code Control halts you are free to edit and continue.

0

精彩评论

暂无评论...
验证码 换一张
取 消