-
Notifications
You must be signed in to change notification settings - Fork 511
Debug adapter process has terminated unexpectedly #243
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
Comments
Hey GHRoss, thanks for the report. Can you zip up the contents of the following folder and send it to me?
|
If there's a better way to send these to you, please let me know. |
Strange, I see no errors in the log output... When you run your code in the debugger, are you selecting the 'PowerShell' or 'PowerShell x86" configuration? |
I'm running into the same issue. The only message that stands out to me is...
Edit: Adding PowerShell version...
|
PowerShell. If I try using PowerShell x86, I get the following...
|
Same problem here. OS Name: Microsoft Windows 10 Pro (10.0.10586 Build 10586) On the first attempt to start debugging, this gets written to DebugAdapterClient.log:
On the second attempt, this is written to the log:
This is the contents of PowerShell.log:
Also, it's worth noting that if I start a brand new project, add a PowerShell file and press F5, the |
FWIW I rolled back to version 0.6.0 of the extension and debugging works fine. P.S. As I thought, the default |
I released 0.7.1 yesterday, has that improved anyone's experience? On another issue (#64), @FaffeF has reported that debugging works more often for him now but still fails intermittently:
|
I'm having the same experience as @FaffeF. It seems to work the first time I debug when opening VS Code, but subsequent debugging fails until I close VS Code. |
Still a problem on 7.1 |
I'm getting this error message a lot. @daviwil
|
Trevor, can you send me your logs? Zip up this folder and e-mail it to me:
|
@daviwil Sent them over -- can you verify the link works? |
@pcgeek86 got it, thanks man! I'll take a look at these in a little while. |
Hi guys, we are having the same problem. We have downgraded to 0.6.1 for now and seems to run fine. |
I downgraded the extension to 0.6.1 and it fixed my issue.
|
I just looked over a bunch of logs and I'm seeing some patterns in the error messages. Looks like the connections to the debug service are being rejected at times even though the Editor Services logs say that the socket was initialized successfully. I'll try to reproduce and fix the issue today. If I can't immediately get a fix I'll still try to make some tweaks to the debugger client so that it's more resilient when a connection can't be made immediately. I'll ship an update in the next day or two after I've made some progress! |
I just want to say that Powershell on osx might be the best thing to happen since sliced bread. |
I think I fixed the problem! Filed an issue on the PowerShellEditorServices repo to track it: PowerShell/PowerShellEditorServices#284 New release with the fix within 24 hours! I'll close the bug after everyone has confirmed that the problem is gone. |
This change fixes an issue in PowerShellContext.AbortException which causes it to throw a NullReferenceException when called after the session has already been aborted. This issue manifests sometimes when the debug adapter finishes execution normally or when it terminates due to a script parsing error. It was initially reported in the following two issues for the PowerShell VS Code extension: PowerShell/vscode-powershell#243 PowerShell/vscode-powershell#273 The fix is to check whether the PowerShellContext.SessionState is Aborted or Disposed before proceeding with the abort.
Hello, |
Hi @christianhv, could you capture logs using version 0.7.2 so that I can see what might be going wrong? Full instructions can be found here: https://github.com/PowerShell/vscode-powershell#2-capture-verbose-logs-and-send-them-to-us |
@daviwil FYI I just wanted to let you know that I'm currently not experiencing the bug on 0.7.2 with VSCode 1.4.0. Thanks for fixing it! Hopefully Christian's issue is an easy one to solve. |
Hello, I could not upload the zip file. You can find it as attachment in this email. Regards, On Sep 07, 2016, at 03:59 PM, David Wilson [email protected] wrote: Hi @christianhv, could you capture logs using version 0.7.2 so that I can see what might be going wrong? Full instructions can be found here: |
Hi Christian, unfortunately GitHub does not include e-mail attachments when you reply to issue mails. Can you email your zip file to daviwil [at] microsoft.com? Thanks! |
I already did that. Thanks Kind regards, On Sep 7, 2016, 7:05 PM +0200, David Wilson [email protected], wrote:
|
Christian, I haven't received the logs in a separate e-mail (not in my junk mail either). If you sent the logs to the e-mail address you are replying to now, that goes to GitHub, not my e-mail address. Can you send a new e-mail directly to daviwil [at] microsoft.com with the logs? If you've done that already, I apologize, but I never received it. |
Christian, are you using Windows 7? I am still experiencing the same issues on my personal Windows 7 laptop (didn't upgrade, bootcamp Macbook Pro drivers for my generation don't exist for Windows 10 👎 ) BUT my work PC is Windows 10 and seems to be working fine with the latest update. |
@GHRoss great question, I'll check it out on Windows 7 on Monday. Too many OS versions and platforms to keep up with now :) |
I'm now having problems with the latest version of VS Code and the PowerShell extention! I get no output in the debugger now. Tested on Windows 10 and Windows 7. Script gives expected output in ISE. |
What happens if you set a breakpoint somewhere near the end of the script, does it get written out when you run again? If so, could be another manifestation of issue #284. |
Almost certainly this is the same issue
Some scripts will work, others do nothing.
Write-Output doesn't work, for example. But that's a separate issue now.
I'd say this bug is resolved?
|
I had a similar error where write-output is not shown, after several tests I was able to trigger the "Debug adapter process has terminated unexpectedly" in VS Code: 1.5.1/Windows 8 version 6.3.9600 but the issue is intermittent. I reduced my test down to a document which contains two lines: If I add a breakpoint or throw an error via typing invalid commands I will see the output returned to the Debug Console. Should I be commenting on #284 even though it is closed? |
the run line should be "code Microsoft.VisualStudio.Services.VSIX" |
Hey @ConstantineK, #284 is open, you should subscribe to that issue to be notified when the issue is fixed. |
Hello, Sorry for my late reply. I did send the log files. I will check again but I think already did. Yes, indeed. I am using windows 7. Regards. |
So i'm on windows 7 with vscode 1.8.1 (latest as of today) and powershell ext 0.8.0 and I have this issue all the time. It works with simple powershell but as soon as I call other stuff and the PS becomes complex it fails then I get this error for 5 or 6 runs (have to stop VSC and restart it) until it starts working again. I have nothing in the log stating errors all is clean (start listening etc. no errors)... Was working ok with old extension IIRC. Will try and revert and let you know. |
@tegaaa Have you tried turning on Verbose logging to see if there's any extra information there? You should send logs regardless of whether anything looks obviously like an error: https://github.com/PowerShell/vscode-powershell#2-capture-verbose-logs-and-send-them-to-us |
Here it is. Terribly annoying. I can’t debug at all now… I’m still on 0.8.0 but something is broken not sure what.
Cheers,
ET
From: David Wilson [mailto:[email protected]]
Sent: Thursday, December 22, 2016 2:44 PM
To: PowerShell/vscode-powershell <[email protected]>
Cc: Etienne Tremblay <[email protected]>; Mention <[email protected]>
Subject: Re: [PowerShell/vscode-powershell] Debug adapter process has terminated unexpectedly (#243)
@tegaaa <https://github.com/tegaaa> Have you tried turning on Verbose logging to see if there's any extra information there? You should send logs regardless of whether anything looks obviously like an error:
https://github.com/PowerShell/vscode-powershell#2-capture-verbose-logs-and-send-them-to-us
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#243 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/APdo4GBMmidnVRSaL9cAfoM_BZhRk1KFks5rKtL8gaJpZM4JnwiU> . <https://github.com/notifications/beacon/APdo4PD0CwMIJRsB_PGodSrVB2O7zXyrks5rKtL8gaJpZM4JnwiU.gif>
|
so here it is (the log). I can't debug at all now... I love Code and this extension is a god save compared to ISE. I'm sure you'll figure it out. |
I've just hit the same issue on VSCode 1.8.1 and PowerShell extension 0.8.0. I seem to have solved this by uninstalling the PowerShell extension, reloading VSCode and reinstalling the extension. I can now debug PowerShell again. Posting here as it's the top result on Google when searching for this. |
Running VS Code 1.8.1, PowerShell extension 0.8.0: Steps taken:
Here's my EditorServices.log: The only way I can get past this is by killing the powershell.exe process in Task Manager, then letting VSC restart the extension. Also, when this issue happens, the poweshell.exe process is consuming a large amount of RAM - I've seen it as high as 150 MB. |
I downloaded "cppcheck" plugin, but it coudn't be installed on my VSCode properly. In my case, uninstalling "cppcheck" solved my issue. |
With the latest version of VS Code (1.4.0), and the latest version of PowerShell for VS Code (0.7.0) running on Windows 10 version 1607 OS Build 14393.51, whenever I run a PowerShell script, I get a 'Debug adapter process has terminated unexpectedly'.
This is what I see in developer tools...
Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: 40995 for PowerShell.ExpandAlias [Extension Host] Spell and Grammar checker active... [Extension Host] Default Settings [Extension Host] Code Actons Registering for: markdown [Extension Host] Code Actons Registering for: plaintext [Extension Host] powershell.exe started, pid: 8264, exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe [Extension Host] Socket connected! Debug adapter process has terminated unexpectedly Debug adapter process has terminated unexpectedly: Error: Debug adapter process has terminated unexpectedly at Object.C [as create] (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:34:19570) at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:105:21677 at Object.m [as _notify] (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:8153) at Object.B.enter (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:11658) at i.Class.define._run (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:12979) at i.Class.define._chainedError (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:12338) at i (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:10161) at i.Class.define.then (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:13788) at Object.P.enter (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:10230) at i.Class.define._run (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:12979) at i.Class.define._setCompleteValue (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:30:12673)
This is my launch.json which hasn't been changed since I updated PowerShell for VS Code...
The text was updated successfully, but these errors were encountered: