Omnisharp-vscode: Debugger: didn't support Edit and Continue feature

Created on 29 Jun 2016  路  69Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:
VS Code version:1.2.1
C# Extension version:1.1.7

Steps to reproduce

  1. We add following code to update the value of one variable when break mode:
    a++;
  2. then save the updated file;
  3. F10

    Expected behavior

the new line will be executed and the value will be increased

Actual behavior

the new line is skipped and the value is not changed

Debugger Feature Request

Most helpful comment

@gregg-miskelly, +1

Any news?

All 69 comments

@AmberZhang2016 Edit and Continue is a large and very connected feature which we don't have any immediate plans to bring to VS Code. I will leave this open, and people feel free to '+1' this. But, just to be clear, it is at least going to be a while before we get to this.

@gregg-miskelly, +1

Any news?

Very interested in something like this. Working from macOS with dotnet can be tough, this would really aid in the development process

+1

+1

+1

Recently discovered dotnet watch with .net core. Having the same functionality with the addition of debugging would be great!

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

"But, just to be clear, it is at least going to be a while before we get to this."

2 years later... any luck :)

+2

:) Not yet. But thanks for voting. The more votes the easier it will be to get funding for the project.

+1

We have rather complex applications that control actual machines and it is extremely time consuming (think hours!) to restart them and bring the software and the machines back into the desired state before we can try the effects that changes have to the overall system.

Of course we have unit test and integration test and all that but often it is just needed to test/try/fix things with/on the actual production hardware.

With the classic .NET Framework this is not really an option because customers might not allow the installation of a debugger on the production PC that controls the machine.

With both the .NET Core debugger and VS Code being copy-deployable, this would actually become an option and it would be extremely cool to have this ability. It would be an absolute killer feature for us.

@bitbonk just as an FYI, you actually have been able to XCopy Visual Studio's remote debugger for a very long time now, in case that helps you.

@gregg-miskelly Yes I am aware of that, but last time I checked edit & continue was not possible. I'd love to be proven wrong though.

I thought VS added support for remote managed EnC, but I could be remembering wrong...

@gregg-miskelly I just checked again, and you are right. Edit&Continue on classic .NET (4.7.2) does indeed work with remote debugging even if the remote debugger is launched from a remote file share. But (and that's a big but for us unfortunately) you have to launch the application with the debugger, attaching it later does not allow Edit&Continue.

I wonder if it would theoretically be possible that it could work with attaching the debugger locally to a running process in .NET Core.

Technically the requirement is that the code must be Just-In-Time compiled with EnC enabled. The normal way to have that happen is to launch under a debugger. But if you don't mind giving up a bit of perf, you can run your app with the environment variable COMPLUS_ForceEnc=1 set, and then you can attach later and EnC.

Wow that鈥榮 interesting info. I wasn鈥檛 aware of the environment variable. It seems to have some limitations though, most notably

If you make an edit after attaching you cannot detach the debugger; the debugger will terminate the process when you stop debugging

To be clear - that is due to the way EnC works, not because of anything to do with the environment variable.

It's an important feature

+1
or i should to say +2000 for me and my partners

exp(Important Feature!)!

1

Yes dotnet watch run need to be integrate to omnisharp

every debug process takes at least about 5 minutes in medium and large applications without edit and continue so this is important feature ! i'll give this issue a BIG +1 ...

+1

+1

+1

+1

+1

+249+2-1

EDIT:

Ignore this solution, breakpoints don't work.


I found the solution to this with sheer luck

  1. Stop all running dotnet processes
  2. Open .vscode/launch.json
  3. Change the line "preLaunchTask": "build", to "preLaunchTask": "watch",
  4. Start debug mode again (F5 or in the menu: Debug -> Start Debugging)

My answer on SO

+1

+1 Thanks

+1

+2147483647

+0xfffffff

+1

+1

+1



                            1111111   
                           1::::::1   
                          1:::::::1   
       +++++++            111:::::1   
       +:::::+               1::::1   
       +:::::+               1::::1   
 +++++++:::::+++++++         1::::1   
 +:::::::::::::::::+         1::::l   
 +:::::::::::::::::+         1::::l   
 +++++++:::::+++++++         1::::l   
       +:::::+               1::::l   
       +:::::+               1::::l   
       +++++++            111::::::111
                          1::::::::::1
                          1::::::::::1
                          111111111111

I found that "spring-boot-devtool" can make spring boot apps live reload in vs code.
so, I hope the dotnet sdk would support this feature instead of vs code debugger.

+1 bois

Any news about this?

+100!

+1

+1

+1

i think this issue (dotnet/runtime#12409) should be fixed first

+1

+1

Any news about this?

The omnishare-vscode comunicates with a omnisharp-roslyn or with the omnisharp-server?

omnisharp-roslyn.
omnisharp-server is legacy.

however it also has nothing to do with debugger, debugger is a separate component

+1

+1

+1

+1

Was this page helpful?
0 / 5 - 0 ratings