Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.NET Debugging No Longer Working #541

Closed
weinand opened this issue Jul 8, 2016 · 10 comments
Closed

ASP.NET Debugging No Longer Working #541

weinand opened this issue Jul 8, 2016 · 10 comments
Labels

Comments

@weinand
Copy link

weinand commented Jul 8, 2016

From @robbpriestley on July 8, 2016 2:29

  • VSCode Version: 1.3.0
  • OS Version: OSX El Cap 10.11.5
  • .NET Core Version: 1.0.0-preview2-003121

Steps to Reproduce:

  1. As normal, use debugger for ASP.NET debugging
  2. Upgrade VS Code from 1.2.1 to 1.3.0
  3. Debugging no longer works. Error message given in VS Code debug console window:

ERROR: CLRDBG exited unexpectedly with exit code 133 (0x85). Debugging will now abort.
The program '/Users/Me/MyPath/MyProgram.dll' has exited with code -1 (0xffffffff).

I re-installed .NET Core just to be on the safe side--no difference. I was already running the latest version. I also noticed after I installed the new version of VS Code that a background process re-installed the debug module (? details hazy--I just saw it on the status bar on the bottom of the screen).

Copied from original issue: microsoft/vscode#8879

@ruicraveiro
Copy link

Hi, exactly the same thing happening to me.

@caslan
Copy link
Contributor

caslan commented Jul 8, 2016

@ruicraveiro What is the CSharp extension version you are using?

@ruicraveiro
Copy link

Hi Cagri, I'm using 1.2.2. Any other information you might need, please ask.

@ruicraveiro
Copy link

ruicraveiro commented Jul 8, 2016

When trying to run using .net core launch, I get exactly the same error as Weinand's. Adding to that, on the extension output I get: waiting for v8 protocol on stdin/stdoutwaiting for v8 protocol on stdin/stdout.

I also tried to run the app via command line and attach the debugger to it. When attaching it also fails, but this time, the message I get is one of those popups saying "Debug adapter process has terminated unexpectedly". I also get a message in the extension log saying:

waiting for v8 protocol on stdin/stdoutwaiting for v8 protocol on stdin/stdoutwaiting for v8 protocol on stdin/stdout
Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'WorkerThread'.
at Microsoft.MIDebugEngine.WorkerThread.PostOperation(Operation op)
at Microsoft.MIDebugEngine.DebuggedProcess.<>c__DisplayClass53_0.<.ctor>b__2(Object o, EventArgs args)
at MICore.Debugger.d__118.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_1(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

@caslan
Copy link
Contributor

caslan commented Jul 8, 2016

@ruicraveiro, the same scenario doesn't reproduce here for us, so we will need to see what's going on from the logs. Can you add the following in your launch.json configuration:

"logging" : {
"engineLogging" : true,
"trace": true,
"traceResponse" : true
}

and send us what you get in the debug console? (You can send to [email protected] if you prefer) There must be an error we are running into before the ObjectDisposedException error.

@ruicraveiro
Copy link

Here goes (with some paths replaced by [undisclosed]:

1: (487) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
1: (517) LaunchOptions ExePath='dotnet'
1: (517) LaunchOptions WorkingDirectory='/Users/ruicraveiro/Sources/customers/[undisclosed]/[undisclosed]Backend/src/[undisclosed]Backend'
1: (517) LaunchOptions ExeArguments='/Users/ruicraveiro/Sources/customers/[undisclosed]/[undisclosed]Backend/src/[undisclosed]Backend/bin/Debug/netcoreapp1.0/[undisclosed]Backend.dll'
1: (517) LaunchOptions MIDebuggerPath='/Users/ruicraveiro/.vscode/extensions/ms-vscode.csharp-1.2.2/coreclr-debug/debugAdapters/clrdbg'
1: (517) LaunchOptions MIMode='clrdbg'
1: (517) LaunchOptions>
1: (517) LaunchOptions
1: (1231) Starting: "/Users/ruicraveiro/.vscode/extensions/ms-vscode.csharp-1.2.2/coreclr-debug/debugAdapters/clrdbg" --interpreter=mi
1: (1280) DebuggerPid=7580
1: (1282) ->(gdb)
1: (1329) <-1001-exec-arguments /Users/ruicraveiro/Sources/customers/[undisclosed]/[undisclosed]Backend/src/[undisclosed]Backend/bin/Debug/netcoreapp1.0/[undisclosed]Backend.dll
1: (1333) ->1001^done
1: (1334) ->(gdb)
1: (1338) 1001: elapsed time 9
1: (1341) <-1002-environment-cd /Users/ruicraveiro/Sources/customers/[undisclosed]/[undisclosed]Backend/src/[undisclosed]Backend
1: (1342) ->1002^done
1: (1342) ->(gdb)
1: (1342) 1002: elapsed time 0
1: (1342) <-1003-gdb-set client-version "14.0.30629.1"
1: (1342) ->1003^done
1: (1342) 1003: elapsed time 0
1: (1343) <-1004-gdb-set client-ui "VSCode"
1: (1343) ->(gdb)
1: (1343) ->1004^done
1: (1343) ->(gdb)
1: (1343) 1004: elapsed time 0
1: (1343) <-1005-file-exec-and-symbols dotnet
1: (1343) ->1005^done
1: (1343) ->(gdb)
1: (1343) 1005: elapsed time 0
1: (1344) <-1006-break-insert main
1: (1344) ->1006^error,msg="-break-insert currently only supports file/line breakpoints"
1: (1344) ->(gdb)
1: (1351) 1006: elapsed time 7
1: (1374) <-1007-gdb-set just-my-code 1
1: (1374) ->1007^done
1: (1374) ->(gdb)
1: (1375) 1007: elapsed time 1
E initialized: {"type":"initialized"}
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.30629.1","VS.Diagnostics.Debugger.HostVersion":"1.0.20628.1","VS.Diagnostics.Debugger.AdapterId":"coreclr","VS.Diagnostics.Debugger.Launch.Duration":1178,"VS.Diagnostics.Debugger.Launch.IsCoreDump":false},"type":"output"}
R: {"success":true,"message":null,"request_seq":2,"command":"launch","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
C setExceptionBreakpoints: {"filters":["all","user-unhandled"]}
R: {"success":true,"message":null,"request_seq":3,"command":"setExceptionBreakpoints","body":{},"running":false,"refs":null,"seq":0,"type":"response"}
C configurationDone: null
R: {"success":true,"message":null,"request_seq":4,"command":"configurationDone","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
1: (1503) <-1008-break-exception-insert throw+user-unhandled *
1: (1503) ->1008^done,bkpt=[{number="1"}]
1: (1503) ->(gdb)
1: (1511) 1008: elapsed time 8
1: (1527) <-1009-break-exception-insert --mda throw+user-unhandled *
1: (1528) ->1009^done,bkpt=[{number="2"}]
1: (1528) ->(gdb)
1: (1528) 1009: elapsed time 0
1: (1531) <-1010-exec-run
1: (1765) ->=telemetry,event-name="VS/Diagnostics/Debugger/clrdbg/ProcessCreate",properties={VS.Diagnostics.Debugger.clrdbg.Version="14.0.25430.0 built by: CLRDBG",VS.Diagnostics.Debugger.clrdbg.OSFamily="Darwin",VS.Diagnostics.Debugger.clrdbg.KernelRelease="15.5.0"}
1: (1766) ->1010^running
1: (1766) ->(gdb)
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/clrdbg/ProcessCreate","data":{"VS.Diagnostics.Debugger.clrdbg.Version":"14.0.25430.0 built by: CLRDBG","VS.Diagnostics.Debugger.clrdbg.OSFamily":"Darwin","VS.Diagnostics.Debugger.clrdbg.KernelRelease":"15.5.0"},"type":"output"}
1: (1776) 1010: elapsed time 245
1: (2069) STDERR: dyld: lazy symbol binding failed: Symbol not found: _GetProcessIdDisambiguationKey
1: (2069) STDERR: Referenced from: /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0-rc2-3002702/libmscordbi.dylib
1: (2069) STDERR: Expected in: /Users/ruicraveiro/.vscode/extensions/ms-vscode.csharp-1.2.2/coreclr-debug/debugAdapters/libmscordaccore.dylib
1: (2069) STDERR: dyld: Symbol not found: _GetProcessIdDisambiguationKey
1: (2069) STDERR: Referenced from: /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0-rc2-3002702/libmscordbi.dylib
1: (2069) STDERR: Expected in: /Users/ruicraveiro/.vscode/extensions/ms-vscode.csharp-1.2.2/coreclr-debug/debugAdapters/libmscordaccore.dylib
1: (2176) "/Users/ruicraveiro/.vscode/extensions/ms-vscode.csharp-1.2.2/coreclr-debug/debugAdapters/clrdbg" exited with code 133 (0x85).
1: (2183) <-logout
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/MIEngine/DebuggerAborted","data":{"VS.Diagnostics.Debugger.MIEngine.DebuggerName":"CLRDBG","VS.Diagnostics.Debugger.MIEngine.LastSentCommandName":"-exec-run","VS.Diagnostics.Debugger.MIEngine.DebuggerExitCode":"133 (0x85)","VS.Diagnostics.Debugger.clrdbg.Version":"14.0.25430.0 built by: CLRDBG","VS.Diagnostics.Debugger.clrdbg.OSFamily":"Darwin","VS.Diagnostics.Debugger.clrdbg.KernelRelease":"15.5.0"},"type":"output"}
E output: {"category":"console","output":"ERROR: CLRDBG exited unexpectedly with exit code 133 (0x85). Debugging will now abort.\n","data":null,"type":"output"}
ERROR: CLRDBG exited unexpectedly with exit code 133 (0x85). Debugging will now abort.
E output: {"category":"console","output":"The program '/Users/ruicraveiro/Sources/customers/[undisclosed]/[undisclosed]Backend/src/[undisclosed]Backend/bin/Debug/netcoreapp1.0/[undisclosed]Backend.dll' has exited with code -1 (0xffffffff).\r\n\n","data":null,"type":"output"}
The program '/Users/ruicraveiro/Sources/customers/[undisclosed]/[undisclosed]Backend/src/[undisclosed]Backend/bin/Debug/netcoreapp1.0/[undisclosed]Backend.dll' has exited with code -1 (0xffffffff).
E exited: {"exitCode":-1,"type":"exited"}
E terminated: {"type":"terminated"}
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/DebugCompleted","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.30629.1","VS.Diagnostics.Debugger.HostVersion":"1.0.20628.1","VS.Diagnostics.Debugger.AdapterId":"coreclr","VS.Diagnostics.Debugger.DebugCompleted.BreakCounter":0},"type":"output"}
C disconnect: {"restart":false}
R: {"success":true,"message":null,"request_seq":5,"command":"disconnect","body":null,"running":false,"refs":null,"seq":0,"type":"response"}

@caslan
Copy link
Contributor

caslan commented Jul 8, 2016

@ruicraveiro it looks like your app is referencing RC2 runtime. CSharp extension no longer supports debugging that. Is it possible for you to move to RTM and try again?

@ruicraveiro
Copy link

Hi Cagri, that was the problem. Everything's working now. Thanks!

@caslan
Copy link
Contributor

caslan commented Jul 8, 2016

Excellent, let us know if you run into further issues.

@caslan caslan closed this as completed Jul 8, 2016
@robbpriestley
Copy link

robbpriestley commented Jul 9, 2016

I completely updated all my project.json dependencies to the latest versions (mostly 1.0.0 now!) and as well followed the instructions here: https://docs.efproject.net/en/latest/miscellaneous/rc2-rtm-upgrade.html#net-core-remove-imports-in-project-json

It took a while, but I got everything working again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants