vscode-azurefunctions icon indicating copy to clipboard operation
vscode-azurefunctions copied to clipboard

PowerShell debugging stability problems

Open v-ruizh opened this issue 4 years ago • 7 comments

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 avatar Mar 05 '21 10:03 v-ruizh

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 avatar Mar 06 '21 19:03 Glober777

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

Glober777 avatar Mar 06 '21 19:03 Glober777

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

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

ejizba avatar May 03 '21 20:05 ejizba

Me too!

codaamok avatar Aug 05 '21 21:08 codaamok

@ejizba Now being tracked here: https://github.com/PowerShell/PowerShellEditorServices/issues/1446#issuecomment-981326899

JustinGrote avatar Nov 29 '21 06:11 JustinGrote

Same for me on all of my 3 dev pc.

aistvan avatar Dec 14 '21 23:12 aistvan

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()

StewartRyanSony avatar Mar 01 '22 03:03 StewartRyanSony