VS code debugging issue for azure powershell function - Omnisharp Json Rpc exception
See original GitHub issueEnvironment data
VS Code version: 1.68.0 C# Extension version: 1.25.0 Azure Core tools: v4 powershell version: 7
OmniSharp error
Steps to reproduce
- Create azure powershell function
- Put a breakpoint anywhere and hit F5
- See error
Expected behavior
Should be able to debug the function
Actual behavior
Exception of type Omnisharp.Extensions.JsonRpc.RpcErrorException was thrown
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Omnisharp Json Rpc exception · Issue #3076 · Azure ... - GitHub
Function running successfully but debugger not hitting and that the OmniSharp Json Rpc exception dialogue box pops up - this is happening only ......
Read more >VS code powershell azure function debugging omnisharp ...
Show activity on this post. I have tried with different scenarios, but debugging didn't work: Tried by changing the C# version in VS...
Read more >Microsoft's PowerShell Dev Team Helps Fix OmniSharp
The VS Code PowerShell extension uses the OmniSharp LSP library and Debug Adapter Protocol (DAP) server library, said to be the tool's ...
Read more >Working with PowerShell Azure Functions locally
This article is intended to guide you on how to work with PowerShell Azure Functions in your local machine.
Read more >Create a PowerShell function in Azure using Visual Studio Code
To start the function locally, press F5 or the Run and Debug icon in the left-hand side Activity bar.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have tried the scenarios like
But getting the same exception for us too. Please give us a fix to this issue!
I landed here by searching for possible solutions to the main problem “Omnisharp Json Rpc exception” occuring in VS Code. I tried everything possibly written here but could not get the resolution. I spent complete day in hope to resolve this and finally could do it. Here are the steps that helped me:
-prerequisites:
Azure Functions Core Tools
PowerShell Extension for VS Code -> (or extension of your choice of language)
PowerShell Core 7 (Atleast I had this version installed on my machine)
There are two main files that are required to be checked after you have all prerequisites installed.
configure launch.json { “name”: “Attach to PowerShell Functions”, “type”: “PowerShell”, “request”: “attach”, “customPipeName”: “AzureFunctionsPSWorker”, “runspaceId”: 1, “processId”: “${command:azureFunctions.pickProcess}”, “preLaunchTask”: “func start” //This should match with next tasks.json label }
configure tasks.json
{ “label”: “func start”, “type”: “shell”, “command”: “func start”, “problemMatcher”: “$func-powershell-watch”, “isBackground”: true }
Hope it helps for someone facing the same problem.
Credit to -> https://stackoverflow.com/questions/67119522/how-to-start-azure-function-locally-and-attach-debugger-to-process-dynamically-v