Comments (7)
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.
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.
It's crashing because cwd
is apparently mandatory now.
from netcoredbg.
@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.
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.
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.
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)
- netcorebgb puts display to sleep on macOS HOT 26
- Can't be built on Ubuntu 23.10 HOT 10
- Incorrect thread identified as "Main Thread" in --attach mode HOT 2
- Debugger.Break in non-user code HOT 11
- How to change current thread? HOT 6
- netcoredbg process crashes when pausing after the last debugged thread ended HOT 6
- Break if bad breakpoint condition HOT 3
- Stepping issues HOT 2
- LaunchRequest not working HOT 9
- Windows Defender false positive HOT 2
- `source` of `OutputEvent` is `string` instead of `Source` HOT 6
- Unable to load `dbgshim.dll` after building from source HOT 5
- The value of type double? property in class is confusing HOT 4
- `Assertion failed: !read_lock` when building from source HOT 3
- `InitializedEvent` before `InitializeResponse`
- Build hangs at Creating new dotnet project HOT 6
- Support for launchSettings.json related options in DAP launch request HOT 8
- Segfault when debugging minimal project HOT 4
- Location missing if unhandled Exception occurred in async Main HOT 2
- Allow reading from stdin HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcoredbg.