question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NRE when starting debugging with `pipeTransport`

See original GitHub issue

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.302
 Commit:    9048955601

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.302/

Host (useful for support):
  Version: 2.1.2
  Commit:  811c3ce6c0

.NET Core SDKs installed:
  2.1.302 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

VS Code version: 1.26.1 C# Extension version: 1.15.2

Steps to reproduce

Open directory containing a .Net Core solution, hit F5.

Expected behavior

The application to run/debugger properly as usual.

Actual behaviour

NRE

I posted the issue on VSCode repo as it looks to me a VSCode problem as it started to happening after last update of it however, MSFT folks there are saying it is caused by the C# extension as you can see here https://github.com/Microsoft/vscode/issues/57808#issuecomment-418109705

The codebase isn’t changed in months so I doubt it is a code/config problem as it was working perfectly so far until I had VSCode updated.

No errors on Electron console: image

And this is what happens when I start an app: image

Here is the launch.json:

{
  "version": "0.2.0",
  "configurations": [
      {
          "name": "Kube Debugger",
          "type": "coreclr",
          "request": "launch",
          "program": "/app/EventStore.Kube.dll",
          "cwd": "/app",
          "sourceFileMap": {
              "/src": "${workspaceFolder}"
          },
          "pipeTransport": {
              "debuggerPath": "/root/vsdbg/vsdbg",
              "pipeCwd": "${workspaceFolder}",
              "windows": {
                  "pipeProgram": "kubectl",
                  "pipeArgs": [
                      "exec",
                      "-i",
                      "eventstore",
                      "--namespace",
                      "giro",
                      "--"
                  ],
                  "quoteArgs": false
              }
          }
      }
  ]
}

Any clues on how to workaround it is really appreciated as I’m totally blocked now.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Sep 3, 2018

Lets leave this open to track fixing the error handling here. But glad you solved the problem.

0reactions
galvesribeirocommented, Sep 3, 2018

Oh! Didn’t saw that… It used to work on my old SurfaceBook2, that is why it is not working…

However, now I have this log with a different message:

Starting: "kubectl" exec -i eventstore --namespace giro -- /root/vsdbg/vsdbg --interpreter=vscode
-> (C) {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"coreclr","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"},"type":"request","seq":1}
-> (C) {"command":"launch","arguments":{"name":"Kube Debugger","type":"coreclr","request":"launch","logging":{"engineLogging":false},"program":"/app/EventStore.Kube.dll","cwd":"/app","sourceFileMap":{"/src":"/Users/guto/dev/repos/OctaGame/ES"},"pipeTransport":{"debuggerPath":"/root/vsdbg/vsdbg","pipeCwd":"/Users/guto/dev/repos/OctaGame/ES","pipeProgram":"kubectl","pipeArgs":["exec","-i","eventstore","--namespace","giro","--"],"quoteArgs":false},"__sessionId":"bea615b7-279e-4e3d-a945-926a3aa43051"},"type":"request","seq":2}
<- (E) {"seq":2,"type":"event","event":"output","body":{"category":"console","output":"-------------------------------------------------------------------\nYou may only use the Microsoft .NET Core Debugger (vsdbg) with\nVisual Studio Code, Visual Studio or Visual Studio for Mac software\nto help you develop and test your applications.\n-------------------------------------------------------------------\n"}}
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
<- (E) {"seq":3,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/LaunchFailed","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.ErrorCode":1002,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"debian","VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"9","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"15.7.20426.1 commit:91b285752d1135b8cdcdb3d74b44ca9faee48809"}}}
<- (R) {"seq":4,"type":"response","request_seq":2,"success":false,"command":"launch","message":"launch: program '/app/EventStore.Kube.dll' does not exist."}
-> (C) {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":4}
<- (E) {"seq":5,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/DebugCompleted","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.DebugCompleted.BreakCounter":0,"VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"debian","VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"9","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"15.7.20426.1 commit:91b285752d1135b8cdcdb3d74b44ca9faee48809"}}}
<- (R) {"seq":6,"type":"response","request_seq":4,"success":true,"command":"disconnect"}

image

It wasn’t able to find the application code inside the container but that was a mistake on the kube configMap that was point to the wrong build output directory.

I still think that message could be more user-friendly in case no default nor OS-specific config were found on launch.json.

For now problem solved! Thanks @gregg-miskelly! Enjoy your holiday! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipe transport for remote communication in C++ projects
How to set up pipe transport for debugging C++ code in Visual Studio ... Launch process by starting a container and then using...
Read more >
pipeTransport.pipeArgs command variable replacement not ...
Create a launch.json for remote debugging a csharp docker container. ... Suggestion: Start VSCode debugger from the command-line #10979.
Read more >
Debug .NET apps on Raspberry Pi - Microsoft Learn
Launch the debugger​​ On the Run tab, select the configuration you added to launch. json and select Start Debugging. The app launches on...
Read more >
Remote Debugging of a .Net Core application with VS Code ...
Start and debug your remote application (Press “F5” and debug) ... In the Hello World project root, we start creating a new script...
Read more >
Omnisharp VsCode Attaching to remote processes - microestc
Open up .vscode/launch.json in VS Code, and add a new ... the play button (F5) to bring up the process selection UI and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found