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

PowerShell debugging stability problems #2734

Open
v-ruizh opened this issue Mar 5, 2021 · 7 comments
Open

PowerShell debugging stability problems #2734

v-ruizh opened this issue Mar 5, 2021 · 7 comments

Comments

@v-ruizh
Copy link

v-ruizh commented Mar 5, 2021

OS: Win 10 and Linux
Build Version: 20210304.27
PowerShell: 7.1.2

Repro Steps:

  1. Create a PowerShell project and set a breakpoint in it.
  2. Debug this project.
  3. Copy the function url and execute "curl ?name=test" in Terminal.

Expect:
The breakpoint is hit.

Actual:
The breakpoint is not hit.

@v-ruizh v-ruizh added the AT-CTI Created by CTI team label Mar 5, 2021
@Glober777
Copy link

I'm experiencing the same thing. Tried with both HTTP and Timer triggers. Functions run just fine but the execution almost never gets interrupted at breakpoint (it worked only twice out of tens of retries).

OS: Windows 10 (2004)
VSCode: 1.54 and 1.54.1
PowerShell: Windows PowerShell 5.1, PowerShell 7.1

@Glober777
Copy link

I suspect that it may be related to the same issue that is causing #2656 to occur ( microsoft/vscode#118256).

@ejizba ejizba added this to the 1.4.0 milestone Mar 22, 2021
@ejizba
Copy link
Contributor

ejizba commented May 3, 2021

We've seen a number of PowerShell debugging issues filed lately. It seems they might all have the same root cause: PowerShell/PowerShellEditorServices#1295, see this comment in particular.

I'll use this issue as the main tracker in our repo.

@codaamok
Copy link

codaamok commented Aug 5, 2021

Me too!

@JustinGrote
Copy link

@ejizba Now being tracked here: PowerShell/PowerShellEditorServices#1446 (comment)

@aistvan
Copy link

aistvan commented Dec 14, 2021

Same for me on all of my 3 dev pc.

@StewartRyanSony
Copy link

I'm running into the same problem. Plus I'm getting the following error in the Debug Console

Internal Error - System.Management.Automation.PSInvalidOperationException: The pipeline was not run because a pipeline is already running. Pipelines cannot be run concurrently.
   at System.Management.Automation.RemotePipeline.DoConcurrentCheck(Boolean syncCall)
   at System.Management.Automation.RemoteRunspace.DoConcurrentCheckAndAddToRunningPipelines(RemotePipeline pipeline, Boolean syncCall)
   at System.Management.Automation.RemotePipeline.InitPowerShell(Boolean syncCall, Boolean invokeAndDisconnect)
   at System.Management.Automation.RemotePipeline.Invoke(IEnumerable input)
   at System.Management.Automation.RemoteSessionStateProxy.get_LanguageMode()
   at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.ExecuteScriptStringAsync(String scriptString, StringBuilder errorMessages, Boolean writeInputToHost, Boolean writeOutputToHost, Boolean addToHistory) in D:\a\1\s\src\PowerShellEditorServices\Services\PowerShellContext\PowerShellContextService.cs:line 1019
   at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.ExecuteScriptStringAsync(String scriptString, Boolean writeInputToHost, Boolean writeOutputToHost) in D:\a\1\s\src\PowerShellEditorServices\Services\PowerShellContext\PowerShellContextService.cs:line 980
   at Microsoft.PowerShell.EditorServices.Handlers.DebugEvaluateHandler.Handle(EvaluateRequestArguments request, CancellationToken cancellationToken) in D:\a\1\s\src\PowerShellEditorServices\Services\DebugAdapter\Handlers\DebugEvaluateHandler.cs:line 42
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.<RouteRequest>g__InnerRoute|7_0(IServiceScopeFactory serviceScopeFactory, Request request, TDescriptor descriptor, Object params, CancellationToken token, ILogger logger)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(IRequestDescriptor`1 descriptors, Request request, CancellationToken token)
   at OmniSharp.Extensions.JsonRpc.DefaultRequestInvoker.<>c__DisplayClass10_0.<<RouteRequest>b__5>d.MoveNext()

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

No branches or pull requests

8 participants