Omnisharp-vscode: Cannot execute 2 times debug of unit test

Created on 13 Mar 2018  路  11Comments  路  Source: OmniSharp/omnisharp-vscode

This issue has been moved from Microsoft/vscode/

Author is @massimilianokraus.

Issue Type: Bug

Just the official C# extension.
MSTest unit test.
I click the little gray "debug test" under the TestMethod Attribute. The first time the unit test is executed well.
But if I click again "debug test", in the output it says "Debugging method ...", and it remains blocked there forever.
I must close the window and reopen it to make the unit test debugging to work again.
Only if I put a breakpoint at the end and do "stop" at runtime, it works multiple times.

VS Code version: Code 1.21.0 (9a199d77c82fcb82f39c68bb33c614af01c111ba, 2018-03-07T10:54:22.798Z)
OS version: Darwin x64 17.4.0


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 2900)|
|Load (avg)|2, 2, 2|
|Memory (System)|16.00GB (2.14GB free)|
|Process Argv|/Applications/Visual Studio Code.app/Contents/MacOS/Electron .|
|Screen Reader|no|
|VM|22%|

Extensions (15)

Extension|Author (truncated)|Version
---|---|---
xml|Dot|1.9.2
vscode-eslint|dba|1.4.7
tslint|eg2|1.0.28
dotnet|for|0.0.3
dotnet-test-explorer|for|0.2.0
vscode-yarn|gam|1.6.0
vscode-nuget-package-manager|jmr|1.1.6
vscodeilviewer|jos|0.0.1
mssql|ms-|1.3.0
csharp|ms-|1.14.0
debugger-for-chrome|msj|4.2.0
oracle-plsql|myc|1.0.3
vetur|oct|0.11.7
vscode-sort-json|ric|1.11.0
aspnet-helper|sch|0.6.4


Reproduces only with extensions


Bug Test

Most helpful comment

I can definitely reproduce this problem. On setting a breakpoint I realised that somehow we are closing the socket so an exception is occuring. I am investigating further. Thanks a lot @tsalinger for filing this

All 11 comments

@akshita31 Want to take a look?

Repros on OS X, not Windows.

FWIW, this has been driving me nuts for ages ;-) Its hit/miss.

I can reproduce this on Ubuntu 16.04 and @pietervdvn on Ubuntu 17.10

As in the referenced issue above, I also have this problem on Mint 18.3. In my case I also lose Intellinsense

I can definitely reproduce this problem. On setting a breakpoint I realised that somehow we are closing the socket so an exception is occuring. I am investigating further. Thanks a lot @tsalinger for filing this

@gregg-miskelly @DustinCampbell I tried to understand the issue here and seems that we are closing the socket to the omnisharp server somehow. I tried several times but this issue doesn't reproduce on Windows. Any idea what might be going wrong ?
cc @rchande

+1 for a solution to this

Another +1

Another +1

Another + 1

Was this page helpful?
0 / 5 - 0 ratings