Giter Club home page Giter Club logo

Comments (7)

puremourning avatar puremourning commented on May 18, 2024

I added --log=file and through some reading of the code found the log file. It just contains this:

20-11-09 21:28:19 INFO Start logging
20-11-09 21:28:19 INFO InterpreterVSCode selected
20-11-09 21:28:19 INFO SetDebugger for InterpreterVSCode
20-11-09 21:28:19 INFO pidDebugee = 0
20-11-09 21:28:19 DEBUG > void VSCodeProtocol::EmitCapabilitiesEvent()
20-11-09 21:28:19 DEBUG < void VSCodeProtocol::EmitCapabilitiesEvent()
20-11-09 21:28:19 DEBUG > virtual HRESULT ManagedDebugger::Initialize()
20-11-09 21:28:19 DEBUG > virtual void VSCodeProtocol::EmitInitializedEvent()
20-11-09 21:28:19 DEBUG < virtual void VSCodeProtocol::EmitInitializedEvent()
20-11-09 21:28:19 DEBUG < virtual HRESULT ManagedDebugger::Initialize()
20-11-09 21:28:19 DEBUG > virtual HRESULT ManagedDebugger::SetBreakpoints(std::string, const std::vector<SourceBreakpoint> &, std::vector<Breakpoint> &)
20-11-09 21:28:19 DEBUG < virtual HRESULT ManagedDebugger::SetBreakpoints(std::string, const std::vector<SourceBreakpoint> &, std::vector<Breakpoint> &)
20-11-09 21:28:19 DEBUG > virtual HRESULT ManagedDebugger::InsertExceptionBreakpoint(const ExceptionBreakMode &, const std::__1::string &, uint32_t &)
20-11-09 21:28:19 DEBUG < virtual HRESULT ManagedDebugger::InsertExceptionBreakpoint(const ExceptionBreakMode &, const std::__1::string &, uint32_t &)

from netcoredbg.

puremourning avatar puremourning commented on May 18, 2024

And running the messages through manually:

ben@BenMBP bin % ./netcoredbg --interpreter=vscode
Content-Length: 340^M
^M
{"command": "initialize", "arguments": {"adapterID": "netcoredbg", "clientID": "vimspector", "clientName": "vimspector", "linesStartAt1"
: true, "columnsStartAt1": true, "locale": "en_GB", "pathFormat": "path", "supportsVariableType": true, "supportsVariablePaging": false,
 "supportsRunInTerminalRequest": true}, "seq": 0, "type": "request"}'
Content-Length: 254

{"seq":1,"body":{"capabilities":{"supportTerminateDebuggee":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest
":true,"supportsExceptionInfoRequest":true,"supportsFunctionBreakpoints":true}},"event":"capabilities","type":"event"}Content-Length: 56

{"seq":2,"body":{},"event":"initialized","type":"event"}Content-Length: 271

{"seq":3,"body":{"supportTerminateDebuggee":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supports
ExceptionInfoRequest":true,"supportsFunctionBreakpoints":true},"command":"initialize","request_seq":0,"success":true,"type":"response"}C
ontent-Length: 238^M
^M
{"command": "setBreakpoints", "arguments": {"source": {"name": "Program.cs", "path": "/Users/ben/.vim/bundle/vimspector/support/test/csh
arp/Program.cs"}, "breakpoints": [{"line": 9}]}, "sourceModified": false, "seq": 1, "type": "request"}'
Content-Length: 227

{"seq":4,"body":{"breakpoints":[{"id":1,"line":9,"message":"The breakpoint is pending and will be resolved when debugging starts.","veri
fied":false}]},"command":"setBreakpoints","request_seq":1,"success":true,"type":"response"}Content-Length: 97^M
^M
{"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 2, "type": "request"}'
Content-Length: 136

{"seq":5,"body":{"supportsExceptionOptions":false},"command":"setExceptionBreakpoints","request_seq":2,"success":true,"type":"response"}
Content-Length: 238^M
^M
{"command": "launch", "arguments": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/net
coreapp2.2/csharp.dll", "args": [], "stopAtEntry": true, "name": "test"}, "seq": 3, "type": "request"}'
zsh: abort      ./netcoredbg --interpreter=vscode
ben@BenMBP bin % 

from netcoredbg.

puremourning avatar puremourning commented on May 18, 2024

It's crashing because cwd is apparently mandatory now.

Screenshot 2020-11-09 at 21 53 12

from netcoredbg.

viewizard avatar viewizard commented on May 18, 2024

@puremourning as I know, that was added in order to support VSCode IDE current C# plugin vscode protocol implementation, that explicitly provide cwd now. I believe, you could provide "cwd":"" in order to make it work with netcoredbg.
Something like we have in our tests:

{"arguments":{"name":".NET Core Launch (console) with pipeline","type":"coreclr","preLaunchTask":"build","program":"VSCodeExampleTest/bin/Debug/netcoreapp3.1/VSCodeExampleTest.dll","cwd":"","console":"internalConsole","stopAtEntry":true,"internalConsoleOptions":"openOnSessionStart","__sessionId":"25f04dfb-ddd9-4a7c-a6c0-c5417ef86f23"},"command":"launch","seq":2,"type":"request"}

I am not sure, why this one was added as required part of launch command.

from netcoredbg.

puremourning avatar puremourning commented on May 18, 2024

I worked out that adding a cwd makes it stop crashing.

Are the launch arguments documented anywhere? How will users know what is mandatory? Will netcoredbg frequently introduce breaking changes like this on version change? Perhaps rejecting the message would be better than crashing.

from netcoredbg.

viewizard avatar viewizard commented on May 18, 2024

Are the launch arguments documented anywhere?

All our vscode protocol implementation aimed to cover VSCode C# plugin interaction with debugger. Not sure, that you could find any info except VSCode C# plugin source code.

How will users know what is mandatory?

We don't provide any docs about vscode protocol, so, source code analyze is the only way for now.

Will netcoredbg frequently introduce breaking changes like this on version change?

I hope, no.

Perhaps rejecting the message would be better than crashing.

Yes, should be fixed. Imo, debugger should return reply with error on such request. I need investigate this code first, I see some lines that worry me now.

from netcoredbg.

viewizard avatar viewizard commented on May 18, 2024

I updated git repo:

  • "cwd" moved to optional parameters now.
  • debugger will care about json code exceptions (this should prevent all related crashes in future + will provide related output).

from netcoredbg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.