samsung / netcoredbg Goto Github PK
View Code? Open in Web Editor NEWNetCoreDbg is a managed code debugger with MI interface for CoreCLR.
License: MIT License
NetCoreDbg is a managed code debugger with MI interface for CoreCLR.
License: MIT License
I tried to use netcoredbg as vscode's debugger with dotnet sdk-3.0pre3.
I set breakpoint, but vscode did not stop at the breakpoint.
dotnet new console
TargetFramework
to netcoreapp3.0
dotnet build
Console.WriteLine
launch.json setting is following;
{
"name": ".NET Core Launch with netcoredbg",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/consolereadkeytest.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "cmd",
"pipeArgs": ["/c"],
"debuggerPath": "g:/bin/netcoredbg/netcoredbg.exe"
}
}
(fix "program" to point "netcoreapp3.0" directory)
stop on Console.WriteLine
and variables are displayed.
program exited with code 0.
TargetFramwork
== netcoreapp2.1
and netcoreapp2.2
, breakpoint worked expectedlyHi,
I just upgraded the version of netcoredbg in vimspector and now with the test application here, netcoredbg just exits after vimspector sends the launch request. Here's the message trace:
2020-11-07 18:23:47,463 - INFO - Starting debug adapter with: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "name": "netcoredbg"}
2020-11-07 18:23:47,469 - INFO - Debug Adapter Started
2020-11-07 18:23:47,470 - DEBUG - Sending Message: {"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"}
2020-11-07 18:23:47,474 - DEBUG - Message received: {'seq': 1, 'body': {'capabilities': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True}}, 'event': 'capabilities', 'type': 'event'}
2020-11-07 18:23:47,475 - DEBUG - Message received: {'seq': 2, 'body': {}, 'event': 'initialized', 'type': 'event'}
2020-11-07 18:23:47,475 - DEBUG - Sending Message: {"command": "setBreakpoints", "arguments": {"source": {"name": "Program.cs", "path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"}, "breakpoints": [{"line": 9}]}, "sourceModified": false, "seq": 1, "type": "request"}
2020-11-07 18:23:47,475 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 2, "type": "request"}
2020-11-07 18:23:47,475 - DEBUG - Message received: {'seq': 3, 'body': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True}, 'command': 'initialize', 'request_seq': 0, 'success': True, 'type': 'response'}
2020-11-07 18:23:47,475 - DEBUG - LAUNCH!
2020-11-07 18:23:47,475 - DEBUG - Sending Message: {"command": "launch", "arguments": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true, "name": "test"}, "seq": 3, "type": "request"}
2020-11-07 18:23:47,478 - INFO - The server has terminated with status -1
As you can see:
/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg --interpreter=vscode
{"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"}
{'seq': 1, 'body': {'capabilities': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True}}, 'event': 'capabilities', 'type': 'event'}
{'seq': 2, 'body': {}, 'event': 'initialized', 'type': 'event'}
{"command": "setBreakpoints", "arguments": {"source": {"name": "Program.cs", "path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"}, "breakpoints": [{"line": 9}]}, "sourceModified": false, "seq": 1, "type": "request"}
{"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 2, "type": "request"}
{'seq': 3, 'body': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True}, 'command': 'initialize', 'request_seq': 0, 'success': True, 'type': 'response'}
All good so far. Then we send the launch
request:
{"command": "launch", "arguments": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true, "name": "test"}, "seq": 3, "type": "request"}
But at this point, the netcoredbg process just exits: The server has terminated with status -1
.
Do you have any idea what's wrong, or how to debug this?
This tested on macOS with netcoredbg 1.2.0-635
and dotnet 3.1.402
. Haven't tried other Ones.
Thanks,
Ben
vsdbg raises a "process" event when it launches a new process,
{
"seq":6,
"type":"event",
"event":"process",
"body":
{
"name":"/Users/lextm/consoletest/bin/Debug/netcoreapp2.1/consoletest.dll",
"systemProcessId":81517,
"isLocalProcess":true,
"startMethod":"launch"
}
}
which allows the editor/IDE talks to vsdbg learning the process information and perform other initialization (such as setting break points).
However, this project does not raise the same event.
Can this be added?
I'm running code-server in Google Cloud Shell and since code-server cannot run the Microsoft's C# debugger, I'm running netcoredbg.
As mentioned here I updated my launch.json
file by adding "console": "integratedTerminal"
. But I'm still not able to read the input from the debug console and send it to the Console.ReadLine()
. The Debug Console prints the current value of the variable entered in the Debug Console.
Can someone help to sort out the issue so that I can give input to the Console.ReadLine()
from VSCode itself?
Hello,
I am having this weird issue with vscodium where I get breakpoints to break because they are listed as "unverified". The debugger stops itself in a line where intentional exception is thrown. I can start debugging the application from this point on step by step, and as I move to new files, I can set valid breakpoints as long as the debugger is in the same file as the breakpoints. I wonder what is going on here?
It seems to me that vsdbg from Microsoft supports several parameters when launching a program, while netcoredbg only supports three,
One missing piece is that a setting to spin out an external console,
Currently Netcoredbg (from master branch) can't be compiled with CoreCLR 3.0 on Linux.
Steps to reproduce the issue are following (microsoft's dotnet should be installed in /usr/share):
./build.sh -debug -verbose -clang6.0
;https://github.com/dotnet/coreclr.git
, master branch;build
director, change directory to build
;build
directory run following command to configure Netcoredbg:CC=clang-6.0 CXX=clang++-6.0 cmake .. -DCMAKE_INSTALL_PREFIX=/some/path -DCORECLR_DIR=/home/sysop/coreclr.microsoft -DDOTNET_DIR=/usr/share/dotnet -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
make
.Compilation fails with messages showing, that some types or symbols are not defined.
The issues exists because of absence right #include directives in Netcoredbg's code. Previously required files was included by accident, because some vital include-files included via "assert.h" file, but now system-wide (but not microsoft's one) file is used.
I'm sorry I don't have any steps to reproduce this, but a vimspector user reported that there was a json parse error in a response from netcoredbg.
The python json package reports Invalid control character at line/column
. It looks like netcoredbg is returning some unescaped shell sequences in the console
output.
For example: https://files.gitter.im/5bfc5f15d73408ce4fb023af/dYVd/Screenshot-2021-04-13-at-14.08.57.png
2021-04-13 15:39:08,214 - DEBUG - Message received (raw): {"seq":177, "event":"output","type":"event","body":{"category":"stdout","output":"�[40m�[32minfo�[39m�[22m�[49m: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]\n User profile is available. Using '/home/anvba/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.\n"}}
2021-04-13 15:39:08,215 - ERROR - Invalid message received: {"seq":177, "event":"output","type":"event","body":{"category":"stdout","output":"�[40m�[32minfo�[39m�[22m�[49m: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]\n User profile is available. Using '/home/anvba/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.\n"}}
Traceback (most recent call last):
File "/home/anvba/.vim/plugged/vimspector/python3/vimspector/debug_adapter_connection.py", line 231, in _ReadBody
message = json.loads( payload )
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 83 (char 82)
Full log attached.
netcoredbg should be added to https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/ . The page contains a link to add one entry.
I tried to use netcoredbg with dotnet 2.2.104.
If I don't set breakpoints everything works fine, but if I add one or more breakpoint I'll get an error:
{
command: 'threads',
message: 'Failed command \'threads\' : 0x80004005',
request_seq: 4,
seq: 6,
success: false,
type: 'response'
}
netcoredbg's log file is here: https://raw.githubusercontent.com/svor/files/master/netcodedbg-launch.log
Will there be a macOS binary supplied for the 1.2.0-825 release?
Hi all,
Having trouble recovering the string/friendly representation of a variable tried using CLI & MI modes.
For CLI:
print ObjectInstance.ToString() -- Not found!
print $"{ObjectInstance}"
^done,
$"{ObjectInstance}" = "NetCoreDbg.Evaluation+ContextVariable"
For MI mode using https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html#GDB_002fMI as source of debugging commands, tested different commands that could of done the trick but many of which are not available, like for example -var-evaluate-expression
-data-evaluate-expression
-interpreter-exec interpreter
Also it's not clear how does escaping characters works, for example
print dictionary["key"]
^done,
dictionary.key-- Not found!
print dictionary[\"key\"]
^done,
dictionary[\"key\"] -- Not found!
What am I missing? Any help appreciated, thanks!
Is it possible to use on monodevelop?
If yes, how to configure?
These small patches were required to get it to compile with .NET 5.0:
diff --git a/src/debug/netcoredbg/CMakeLists.txt b/src/debug/netcoredbg/CMakeLists.txt
index 5b21494..4036361 100644
--- a/src/debug/netcoredbg/CMakeLists.txt
+++ b/src/debug/netcoredbg/CMakeLists.txt
@@ -27,6 +27,7 @@ include_directories(${CORECLR_DIR}/src/debug/inc)
include_directories(${CORECLR_DIR}/src/debug/shim)
include_directories(${CORECLR_DIR}/src/dlls/dbgshim)
include_directories(${CORECLR_DIR}/src/coreclr/hosts/inc)
+include_directories(${CORECLR_DIR}/src/hosts/inc)
# Build native part of the debugger
diff --git a/src/debug/netcoredbg/cputil.cpp b/src/debug/netcoredbg/cputil.cpp
index a51d448..eb5ca49 100644
--- a/src/debug/netcoredbg/cputil.cpp
+++ b/src/debug/netcoredbg/cputil.cpp
@@ -494,7 +494,6 @@ const char *errormessage(HRESULT hresult)
CASE_OF(CORDBG_E_UNSUPPORTED_DELEGATE, "The delegate contains a delegate currently not supported by the API.");
CASE_OF(PEFMT_E_64BIT, "File is PE32+.");
CASE_OF(PEFMT_E_32BIT, "File is PE32");
- CASE_OF(NGEN_E_SYS_ASM_NI_MISSING, "NGen cannot proceed because Mscorlib.dll does not have a native image");
CASE_OF(CLDB_E_INTERNALERROR, "CLDB_E_INTERNALERROR");
CASE_OF(CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW, "The bound assembly has a version that is lower than that of the request.");
CASE_OF(CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH, "The assembly version has a public key token that does not match that of the request.");
However, even with this, there are several linker errors:
ld: CMakeFiles/netcoredbg.dir/manageddebugger.cpp.o: in function `ManagedCallback::QueryInterface(_GUID const&, void**)':
manageddebugger.cpp:(.text._ZN15ManagedCallback14QueryInterfaceERK5_GUIDPPv[_ZN15ManagedCallback14QueryInterfaceERK5_GUIDPPv]+0x10d): undefined reference to `IID_IUnknown'
ld: CMakeFiles/netcoredbg.dir/valuewalk.cpp.o: in function `Evaluator::GetLiteralValue(ICorDebugThread*, ICorDebugType*, ICorDebugModule*, unsigned char const*, unsigned int, void const*, unsigned int, ICorDebugValue**)':
valuewalk.cpp:(.text+0xb243): undefined reference to `g_tkCorEncodeToken'
ld: valuewalk.cpp:(.text+0xb50c): undefined reference to `g_tkCorEncodeToken'
ld: CMakeFiles/netcoredbg.dir/typeprinter.cpp.o: in function `TypePrinter::NameForTypeSig(unsigned char const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, IMetaDataImport*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
typeprinter.cpp:(.text+0x96f5): undefined reference to `g_tkCorEncodeToken'
ld: typeprinter.cpp:(.text+0xa159): undefined reference to `g_tkCorEncodeToken'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Hello, thank you for the great work first,
i've been having problems trying to make netcoredbg with VS Code in a docker setup with .NET Core 2.2
here is my launch.json config
{
"name": "APIGateway_Attach_Docker",
"type": "coreclr",
"request": "attach",
"sourceFileMap": {
"/src": "${workspaceRoot}"
},
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"debuggerPath": "/netcoredbg/netcoredbg",
"pipeProgram": "docker",
"pipeCwd": "${workspaceFolder}",
"quoteArgs": false,
"pipeArgs": [
"exec",
"-i",
"constellation_apigateway"
]
}
}
It seems like it correctly attach because if I hit pause here:
It will correctly pause the running process and break where it paused:
however when trying to attach a breakpoint I get an "unverified breakpoint"
Do you know if i'm doing anything wrong ?
I've been using my exact same setup that is working with vsdbg with a Microsoft Visual Studio code distrib
Hi and thanks a lot for netcoredbg!
When trying to run a small "Hello World" program FirstVSCode
, I get this output in the debug console of VS Code:
Starting: "bash" -c "/usr/bin/netcoredbg --interpreter=vscode"
Error: SysAllocStringLen not found
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in System.Private.CoreLib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in System.Private.CoreLib.dll
The pipe program 'bash' exited unexpectedly with code 139.
This is my launch.json
:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.0/FirstVSCode.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "bash",
"pipeArgs": ["-c"],
"debuggerPath": "/usr/bin/netcoredbg"},
"console": "internalConsole"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
FirstVSCode.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
</Project>
dotnet --version
: 3.0.100
code --version
:
1.39.2
6ab598523be7a800d7f3eb4d92d7ab9a66069390
x64
I can run the program fine using dotnet run
.
I installed netcoredbg from AUR.
I'm on Arch Linux 5.3.6.
Is this an issue with netcoredbg, VS Code, or something else?
For completeness, here's the program:
using System;
namespace FirstVSCode
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello VS Code World!");
for(int i = 0; i < 10; i++){
Console.WriteLine($"The count is {i}.");
}
}
}
}
The OSX version seems to be missing from this release. Is there any plan to offer this in the releases?
MY ERROR: Please ignore the issue
I'm running Vimspector in Vim. Updated it to run 1.2.0-825.
Debugging tests running through attach (VSTEST_HOST_DEBUG=1 dotnet test) on .NET 5.
Everything runs pretty much the same until a breakpoint is hit.
Log for 1.2.0-782 -
netcoredbg.engine_782.log
Log for 1.2.0-825 -
netcoredbg.engine_825.log
Note, that 57221dd broke netcoredbg build in case of not CoreCLR 3.1 sources usage. Only build with CoreCLR 3.1 sources are supported now.
Broken build looks like:
https://travis-ci.org/github/Samsung/netcoredbg/jobs/738317489
...
c:\users\travis\build\samsung\netcoredbg\src\debug\netcoredbg\cputil.cpp(116): error C2065: 'CTL_E_OVERFLOW': undeclared identifier [C:\Users\travis\build\Samsung\netcoredbg\build\src\debug\netcoredbg\netcoredbg.vcxproj]
...
We are working on fix at this moment.
Hi, I have the following problem:
when trying to call inside the watch of VS Code a method, for example a.GetHashCode()
, I get a Microsoft.CodeAnalysis.Scripting.CompilationErrorException
. See image below; I have made a series of toy examples to show you the problem. So the question is: does this happen to you as well? If not, how can I get rid of this error? On my windows 10 machine (on which I have running dotnet 2.1.401
) I tried with both: the exe available in the releases link, and the exe generated by compiling netcoredbg on my machine..
For a complete error log for the first error in the watch see here below:
Microsoft.CodeAnalysis.Scripting.CompilationErrorException: (1,1): error CS0103: The name 'p' does not exist in the current context
at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.ThrowIfAnyCompilationErrors(DiagnosticBag diagnostics, DiagnosticFormatter formatter)
at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.CreateExecutor[T](ScriptCompiler compiler, Compilation compilation, Boolean emitDebugInformation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.GetExecutor(CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.RunAsync(Object globals, Func`2 catchException, CancellationToken cancellationToken)
at SOS.SymbolReader.EvalExpression(String expr, IntPtr opaque, IntPtr& errorText, Int32& typeId, Int32& size, IntPtr& result)
Thanks in advance for the help.
I get this error when trying to build on Raspberry PI.
Any ideas?
[ 39%] Built target corguids
[ 42%] Linking CXX executable netcoredbg
CMakeFiles/netcoredbg.dir/manageddebugger.cpp.o: In function ManagedCallback::QueryInterface(_GUID const&, void**)': /home/pi/.vs/netcoredbg-master/9103d73c-20b3-4998-995b-f066353b263b/src/src/debug/netcoredbg/manageddebugger.cpp:312: undefined reference to
IID_IUnknown'
/home/pi/.vs/netcoredbg-master/9103d73c-20b3-4998-995b-f066353b263b/src/src/debug/netcoredbg/manageddebugger.cpp:312: undefined reference to `IID_IUnknown'
collect2: error: ld returned 1 exit status
src/debug/netcoredbg/CMakeFiles/netcoredbg.dir/build.make:339: recipe for target 'src/debug/netcoredbg/netcoredbg' failed
make[2]: *** [src/debug/netcoredbg/netcoredbg] Error 1
CMakeFiles/Makefile2:124: recipe for target 'src/debug/netcoredbg/CMakeFiles/netcoredbg.dir/all' failed
Makefile:129: recipe for target 'all' failed
make[1]: *** [src/debug/netcoredbg/CMakeFiles/netcoredbg.dir/all] Error 2
make: *** [all] Error 2
I'm trying to debug simple .Net mvc application which was generated by the command:
dotnet new mvc --no-https --auth None
When I run debug configuration in VS Code, it starts running the application and stops at entry but it freezes at
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
}
As a result the application doesn't start fully and the debugger is frozen. Any idea what is wrong?
Netcoredbg Log file
https://gist.github.com/svor/13af827c7d00b2577aeb7038a70a6412
VS Code debug configuration
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"program": "/home/vsvydenko/tmp/net-core-mvc/bin/Debug/netcoreapp3.0/net-core-mvc.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": true,
"internalConsoleOptions": "openOnSessionStart",
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "bash",
"pipeArgs": ["-c"],
"debuggerPath": "/home/vsvydenko/bin/netcoredbg/netcoredbg --engineLogging=/tmp/a",
"quoteArgs": true
}
},
]
}
Short video
https://youtu.be/beBx9X_bh6g
Environment
os: Linux Mint 19.3 (x86-64)
dotnetcore-sdk: 3.0.1
netcoredbg: latest releas
vsdbg only generates 32 bit integer for stack frame ID, and libraries such as https://www.nuget.org/packages/Microsoft.VisualStudio.Shared.VsCodeDebugProtocol/ uses int (not long) throughout the code base.
However, this project seems to generate 64 bit integer, which can easily break interoperation with other libraries.
Is it possible to change the behavior to match vsdbg?
I'm using Eclipse aCute which integrated netcoredbg as a debugger in a simple hello world project with a String variable:
using System;
namespace NewDotnetProject
{
class Program
{
static void Main(string[] args)
{
String name = "Alex";
Console.WriteLine("Hello "+ name);
}
}
}
Putting breakpoint on Console.WriteLine value of variable name can not be changed. Is netcoredbg supporting it ? AFAIK Eclipse LSP4E project which provides the integration with DAP does.
The fact, that path is hardcoded prevents installing multiple different versions of netcoredbg on the computer (mobile phone, etc...) Especially it's impossible to install, for debugging purposes, particular versions of CoreCLR, CoreFX and netcoredbg in separate directory without touching phone's rootfs.
I think, that path to libdbgshim.so shouldn't be hardcoded, but should be determined by LD_LIBRARY_PATH environment variable, as for other libraries (typical behaviour). And only in case, when libdbgshim.so can't be found in places, where other libraries are searched, only in this case harcoded path should be tried as second option.
Hello, I'm getting this exception thrown by debugger when I'm trying to debug my 'vscode'-debuggable applications:
Console.WriteLine(<some non-English string>);
(App or Debug Console) => Exception: -529697949
<set my cursor on non-English element>
=> Exception: -529697949
In eventvwr.msc I see... =>
Application: netcoredbg.exe CoreCLR Version: 4.6.27817.3 Description: The process was terminated due to an unhandled exception. Exception Info: exception code e06d7363, exception address 00007FFF873FA839 Stack:
In ProcessMonitor I see that these DLLs are missing =>
C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.6\ru-RU\mscorrc.debug.dll C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.6\ru-RU\mscorrc.debug.dll.DLL C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.6\ru\mscorrc.debug.dll ...
if Chinese named variable in code, it will not access the value by use -var-create command in GDB.
This might be a problem with the module calling the debugger rather than netcoredbg
, when running the debugger I get the following errors:
netcoredbg --interpreter=mi --attach 68528
where 68528 is the PID of my test app.
(gdb)
1^done
(gdb)
2^done
(gdb)
3^done
(gdb)
4^error,msg="Unknown command: enable-pretty-printing"
(gdb)
5^error,msg="Unknown command: file-list-exec-source-files"
(gdb)
6^error,msg="Unknown command: file-list-exec-source-file"
(gdb)
7^error,msg="Error: 0x80004005"
(gdb)
8^error,msg="Unknown command: stack-info-frame"
(gdb)
9^done,threads=[{id="85316",name="<No name>",state="running"},{id="84512",name="<No name>",state="running"}]
(gdb)
10^error,msg="Unknown command: break-list"
(gdb)
11^done,threads=[{id="85316",name="<No name>",state="running"},{id="84512",name="<No name>",state="running"}]
(gdb)
12^error,msg="Unknown command: break-list"
(gdb)
Are these unsupported MI commands?
I'm also reaching to the debugging tool authors.
Thank you!
In order to make this debugger easily usable in VSCode and other IDEs (such as Eclipse IDE) supporting the VSCode Debug Adapter Protocol ( https://github.com/Microsoft/vscode-debugadapter-node/tree/master/protocol ), it would be nice to provide the option ot have netcoredbg read/write content conforming to this protocol.
For example, vsdbg has a vsdbg-ui
executable which talks over the debug protocol instead of starting gdb console; and OmniSharp simply uses it as debugger in VSCode, which is then able to do most of the work: https://github.com/OmniSharp/omnisharp-vscode/blob/4dd381fa5e4b1e81266d4796d641d1bf2785d2c8/src/coreclr-debug/activate.ts#L155
It would be great to have some documentation on each command. I managed to run a few things using the unit tests as an example, but that's less than ideal.
Doesn't need to be a full fledged manual, just a Wiki page can work.
I'd like to package this for conda-forge. Is there any chance you could create a release/tag that we could then distribute?
Hello,
Thank you for this great debugger. It's working for me with compiled code in vs.
But when I generate an assembly with roslyn a breakpoint does not break.
I created a small sample project:
https://github.com/lordmampf/PlaygroundForSamsungNetcoredbg
To test start both projects without the vs debugger.
When using roslyn a breakpoint does not work.
Do you have any ideas how to fix this issue?
Is this an issue with the debugger?
Thank you!
I debug a .net core webapi application in code-server, set the breakpoint at Controller class. It paused at the breakpoint when i request from browser, but the code not highlight, the Call Stack not show the method either.
In the snapshot, breakpoint set at var rng = new Random();
From Debug Console log show setBreakpoints sucess
-> (C) {"command":"setBreakpoints","arguments":{"source":{"name":"WeatherForecastController.cs","path":"/home/coder/project/webapidemo/Controllers/WeatherForecastController.cs","checksums":[{"algorithm":"SHA1","checksum":"a5c682ac52a8031e8316527dead42a9d77a5b3ca"},{"algorithm":"SHA256","checksum":"3cd5fc7be889f7ed11dad4727291a7afcbfaf80a91eeea6385948ea044bd298d"},{"algorithm":"SHA1","checksum":"543ac7ce9f0c446b39cc842f78f758fdb9b8a1b9"},{"algorithm":"SHA256","checksum":"532d080bb6470ebe700e4d3ecdd3a33610355f6ebc263ea6e1b70963ecc69bda"}]},"lines":[29],"breakpoints":[{"line":29}],"sourceModified":false},"type":"request","seq":3}
<- (R) {"seq":5,"body":{"breakpoints":[{"id":1,"line":29,"message":"","verified":false}]},"command":"setBreakpoints","request_seq":3,"success":true,"type":"response"}
-> (C) {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
<- (R) {"seq":6,"body":{"breakpoints":[]},"command":"setFunctionBreakpoints","request_seq":4,"success":true,"type":"response"}
-> (C) {"command":"setExceptionBreakpoints","arguments":{"filters":["user-unhandled"]},"type":"request","seq":5}
<- (R) {"seq":7,"body":{"supportsExceptionOptions":false},"command":"setExceptionBreakpoints","request_seq":5,"success":true,"type":"response"}
<- (R) {"seq":8,"body":{},"command":"configurationDone","request_seq":6,"success":true,"type":"response"}
But the stackFrames not contains my code. see the "seq":139
.
<- (E) {"seq":136,"body":{"allThreadsStopped":true,"description":"","reason":"breakpoint","text":"","threadId":17678},"event":"stopped","type":"event"}
-> (C) {"command":"threads","type":"request","seq":13}
<- (R) {"seq":137,"body":{"threads":[{"id":17651,"name":"<No name>"}]},"command":"threads","request_seq":13,"success":true,"type":"response"}
-> (C) {"command":"threads","type":"request","seq":14}
<- (R) {"seq":138,"body":{"threads":[{"id":17651,"name":"<No name>"}]},"command":"threads","request_seq":14,"success":true,"type":"response"}
-> (C) {"command":"stackTrace","arguments":{"threadId":17651,"startFrame":0,"levels":20},"type":"request","seq":15}
<- (R) {"seq":139,"body":{"stackFrames":[{"column":0,"endColumn":0,"endLine":0,"id":75810467741696,"line":0,"moduleId":"4017539b-5ac6-47e1-8acf-385222b96917","name":"System.Threading.ManualResetEventSlim.Wait()"},{"column":0,"endColumn":0,"endLine":0,"id":75810467741697,"line":0,"moduleId":"4017539b-5ac6-47e1-8acf-385222b96917","name":"System.Threading.Tasks.Task.SpinThenBlockingWait()"},{"column":0,"endColumn":0,"endLine":0,"id":75810467741698,"line":0,"moduleId":"4017539b-5ac6-47e1-8acf-385222b96917","name":"System.Threading.Tasks.Task.InternalWaitCore()"},{"column":0,"endColumn":0,"endLine":0,"id":75810467741699,"line":0,"moduleId":"4017539b-5ac6-47e1-8acf-385222b96917","name":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification()"},{"column":0,"endColumn":0,"endLine":0,"id":75810467741700,"line":0,"moduleId":"4017539b-5ac6-47e1-8acf-385222b96917","name":"System.Runtime.CompilerServices.TaskAwaiter.GetResult()"},{"column":0,"endColumn":0,"endLine":0,"id":75810467741701,"line":0,"moduleId":"57b2a5cd-d468-4c19-ba79-131335305fac","name":"Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run()"},{"column":13,"endColumn":51,"endLine":16,"id":75810467741702,"line":16,"moduleId":"4be45882-5c99-4311-869c-538afae641e4","name":"webapidemo.Program.Main()","source":{"name":"Program.cs","path":"/home/coder/project/webapidemo/Program.cs"}}],"totalFrames":7},"command":"stackTrace","request_seq":15,"success":true,"type":"response"}
-> (C) {"command":"continue","arguments":{"threadId":17651},"type":"request","seq":16}
<- (E) {"seq":140,"body":{"allThreadsContinued":true,"threadId":17651},"event":"continued","type":"event"}
<- (R) {"seq":141,"body":{"allThreadsContinued":true,"threadId":17651},"command":"continue","request_seq":16,"success":true,"type":"response"}
<- (E) {"seq":142,"body":{"reason":"exited","threadId":17686},"event":"thread","type":"event"}
I check the log file, there are some Errors
20-07-20 06:48:35 DEBUG > HRESULT ManagedDebugger::GetStackTrace(ICorDebugThread *, int, int, std::vector<StackFrame> &, int &)
20-07-20 06:48:35 ERROR [modules.cpp:351] GetSequencePointByILOffset(info_pair->second.symbols.get(), methodToken, ilOffset, &sequencePoint) : 0x80004005
20-07-20 06:51:54 DEBUG < virtual HRESULT ManagedCallback::CreateThread(ICorDebugAppDomain *, ICorDebugThread *)
20-07-20 06:51:54 DEBUG > virtual HRESULT ManagedDebugger::GetThreads(std::vector<Thread> &)
20-07-20 06:51:54 ERROR [frames.cpp:46] pThread->GetUserState(&corUserState) : 0x80131302
When i create a simple console application, and It works well, so I think the problem only occur in System.Threading.Tasks.Task because it is Asynchronous, the CALL STACK
System.Threading.ManualResetEventSlim.Wait() (Unknown Source:0)
System.Threading.Tasks.Task.SpinThenBlockingWait() (Unknown Source:0)
System.Threading.Tasks.Task.InternalWaitCore() (Unknown Source:0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification() (Unknown Source:0)
System.Runtime.CompilerServices.TaskAwaiter.GetResult() (Unknown Source:0)
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run() (Unknown Source:0)
webapidemo.Program.Main() (\home\coder\project\webapidemo\Program.cs:16)
Environment
os: Debian GNU/Linux 10 (x86_64)
dotnetcore-sdk: 3.1.302
netcoredbg: latest releas
Reproduce the issue
dotnet new webapi -n webapideom -o webapidemo
in shell.Kernel: 5.6.19-2-MANJARO
I downloaded the package from AUR;
I typed in terminal: makepkg -si
And I got the error below:
7/44] Building CXX object src/debug/netcoredbg/CMakeFiles/netcoredbg.dir/manageddebugger.cpp.o
[...]
/home/douglas/Projects/netcoredbg/src/netcoredbg-latest/src/debug/netcoredbg/manageddebugger.cpp:115:7: error: exception specification in declaration does not match previous declaration
pid_t waitpid(pid_t pid, int *status, int options) noexcept
^
/usr/include/sys/wait.h:111:16: note: previous declaration is here
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
^
1 error generated.
[9/44] Building CXX object src/debug/netcoredbg/CMakeFiles/netcoredbg.dir/symbolreader.cpp.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Aborting...
Someone can help me? I need to install that in order to use VSCode Debugger.
Environment:
Windows 10.0.19041
VSCodium 1.50
dotnet 3.1.402
netcoredbg latest win64 binary based on auto-release commit
Related Issues:
VSCodium/vscodium#82
Issue:
Attempting to debug a simple .NET Core console application leads to no breakpoints hit. Have reviewed the issue noted above and made changes to use debugger through pipeTransport
. Only in the event of setting the stopOnEntry
flag do I get a response from the debugger. Also does not work with netcore 2.2
.
Using the following launch.json
:
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/sometest.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false,
"logging": {
"engineLogging": true
},
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "cmd",
"pipeArgs": ["/c"],
"debuggerPath": "C:/bin/netcoredbg/netcoredbg.exe --engineLogging=C:\\Temp\\a"
}
}
On latest Mac OS version, the above works without issue.
Any help would be appreciated as I am not looking to go back to regular vscode or Visual Studio.
Debugger fails to launch the kestrel
process after it hits the service in ConfigureServices()
method
services.AddAuthentication()
Tested with net5.0
, the app runs just not with the debugger attached indicating something is wrong with netcoredbg when it relates to Microsoft.AspNetCore.Authentication
.
We'd like to enable dotnet core debugging on Windows too.
Would it be possible to create a windows distribution just like there is for mac and linux.
(this is currently a low priority request as we have some more work to do on the Eclipse IDE side to enable debugging properly, but a PoC shows it can work well)
Hi all! appreciate your work with this debugger 🙌
Launching the debugger through another C# processes and redirecting it's input/output, and trying to step
I would get:
stopped, reason: end stepping range, thread id: 1081, stopped threads: all, frame={
Main.cs:12 (col: 9 to line: 12 col: 10)
clr-addr: {module-id {d90e33da-6e69-45f7-a539-d4b98ca3e560}, method-token: 0x06000001 il-offset: 54, native offset: 172}
WhatEver.Pinocho(), addr: 0x00007f51176726f0
}
^exit
stopped, reason: exited, exit-code: 1
6893984.915 E/NETCOREDBG(P 7, T 8): ioredirect.cpp: worker(307) > child process stdout/stderr reading error
6893984.915 I/NETCOREDBG(P 7, T 8): ioredirect.cpp: operator(135) > IORedirectHelper::worker: terminated
6893984.929 W/NETCOREDBG(P 7, T 16): waitpid.cpp: waitpid(84) > Process terminated without exiting; can't get exit code. Killed by signal 9. Assuming EXIT_FAILURE.
netcoredbg-linux-bionic-amd64_1.2.0-782
(tested older versions too)dotnet wrapper.dll /binaries/for/netcoredbg "--interpreter=cli -ex "run" -- /usr/bin/dotnet /program/to/debug.dll"
Wrapper program:
static void Main(string[] args)
{
var netcoredbg = args[0];
var arguments = args[1];
var process = new Process
{
StartInfo = new ProcessStartInfo(netcoredbg, arguments)
{
RedirectStandardOutput = true,
RedirectStandardInput = true,
RedirectStandardError = true,
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true
}
};
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.OutputDataReceived += (sender, outputArgs) =>
{
var data = outputArgs.Data;
if (string.IsNullOrEmpty(data)) return;
Console.WriteLine($"UNDERLYING::: {data}");
};
process.ErrorDataReceived += (sender, outputArgs) =>
{
var data = outputArgs.Data;
if (string.IsNullOrEmpty(data)) return;
Console.WriteLine($"UNDERLYING::: {data}");
};
Task.Factory.StartNew(() =>
{
while (true)
{
var line = Console.ReadLine();
process.StandardInput.WriteLine(line);
}
});
process.WaitForExit();
}
Remove links to http://suprem.sec.samsung.net/ and replace them with valid ones.
CC @ayuckhulk
Hi,
I'm facing a strange issue: seems like that symbols are not loaded when I dynamically load an assembly with overload:
Assembly.Load(bytes[], bytes[])
while are correctly loaded if I use the overload that directly open the file:
Assembly.LoadFile()
(tested with .net core 3.0.100 under windows)
Do you have any hints? great work BTW
To simplify adoption, it would be nice if netcoredbg could ship pre-built and ready-to-use tarballs or zips containing the binary.
For example:
(gdb)
1-file-exec-and-symbols dotnet
1^done
(gdb)
2-exec-arguments C:\中文目录\中文文件名.dll
2^done
(gdb)
-exec-run
Additional info can be found at puremourning/vimspector#293
Using this minimal program:
using System;
using System.Threading.Tasks;
namespace test
{
class Program
{
static async Task Main(string[] args)
{
Console.WriteLine("Hello World!");
await DoSomeStuff();
}
public static async Task DoSomeStuff()
{
Console.WriteLine("Before");
await Task.Delay(500);
Console.WriteLine("After");
}
}
}
When sending the "next" request to step over the line await Task.Delay(500)
, the next stack trace response then points to the ending curly brace of the Program.DoSomeStuff
function instead of the line Console.WriteLine("After")
Here is what it looks like graphically:
Sending "next" request
{"command": "next", "arguments": {"threadId": 119152}, "seq": 15, "type": "request"}
The next stack trace response now points the current line at the closing brace instead of the line after the awaited function:
{
"body": {
"stackFrames": [
{
"column": 9,
"endColumn": 10,
"endLine": 20,
"id": 511753943252992,
"line": 20,
"moduleId": "963384f9-3e81-445e-9ecf-224b6b1946c5",
"name": "test.Program.<DoSomeStuff>d__1.MoveNext()",
"source": {
"name": "Program.cs",
"path": "/home/aqez/testyo/Program.cs"
}
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943252993,
"line": 0,
"moduleId": "00e4cc82-435b-478c-b083-227a479f9d7b",
"name": "System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<System.__Canon>()"
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943252994,
"line": 0,
"moduleId": "00e4cc82-435b-478c-b083-227a479f9d7b",
"name": "System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<test.Program.<DoSomeStuff>d__1>()"
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943252995,
"line": 0,
"moduleId": "963384f9-3e81-445e-9ecf-224b6b1946c5",
"name": "test.Program.DoSomeStuff()"
},
{
"column": 13,
"endColumn": 33,
"endLine": 11,
"id": 511753943252996,
"line": 11,
"moduleId": "963384f9-3e81-445e-9ecf-224b6b1946c5",
"name": "test.Program.<Main>d__0.MoveNext()",
"source": {
"name": "Program.cs",
"path": "/home/aqez/testyo/Program.cs"
}
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943252997,
"line": 0,
"moduleId": "00e4cc82-435b-478c-b083-227a479f9d7b",
"name": "System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<System.__Canon>()"
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943252998,
"line": 0,
"moduleId": "00e4cc82-435b-478c-b083-227a479f9d7b",
"name": "System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<test.Program.<Main>d__0>()"
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943252999,
"line": 0,
"moduleId": "963384f9-3e81-445e-9ecf-224b6b1946c5",
"name": "test.Program.Main()"
},
{
"column": 0,
"endColumn": 0,
"endLine": 0,
"id": 511753943253000,
"line": 0,
"moduleId": "963384f9-3e81-445e-9ecf-224b6b1946c5",
"name": "test.Program.<Main>()"
}
],
"totalFrames": 9
},
"command": "stackTrace",
"request_seq": 16,
"seq": 36,
"success": true,
"type": "response"
}
Pretty much the title. I'd like to be able to step through our unit tests using netcoredbg if possible - what would the command line for that be like? Sorry if this has been asked or seems super basic - I couldn't find anything in issues.
Is there anyway that this could be compiled to work with the Raspberry Pi architecture?
Hi, after upgrading the version of netcoredbg in Vimspector to 1.2.0-767, netcoredbg exits after the initialize exchange. this does not happen with the previous version (netcoredbg 1.2.0-635).
Here is the log including the full message trace:
2021-04-11 16:44:07,573 - INFO - **** INITIALISING NEW VIMSPECTOR SESSION ****
2021-04-11 16:44:07,573 - INFO - API is:
2021-04-11 16:44:07,574 - INFO - VIMSPECTOR_HOME = /Users/ben/.vim/vimspector-conf
2021-04-11 16:44:07,574 - INFO - gadgetDir = /Users/ben/.vim/vimspector-conf/gadgets/macos
2021-04-11 16:44:07,574 - INFO - User requested start debug session with {}
2021-04-11 16:44:07,575 - DEBUG - Reading configurations from: None
2021-04-11 16:44:07,575 - DEBUG - Reading configurations from: /Users/ben/.vim/bundle/vimspector/support/test/csharp/.vimspector.json
2021-04-11 16:44:07,576 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.json
2021-04-11 16:44:07,635 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/lldb-vscode.json
2021-04-11 16:44:07,636 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/mono.json
2021-04-11 16:44:07,637 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/netcoredbg.json
2021-04-11 16:44:07,637 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vim-debug-adapter.json
2021-04-11 16:44:07,637 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-cpptools.json
2021-04-11 16:44:07,638 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-javac.json
2021-04-11 16:44:07,638 - DEBUG - Reading gadget config: None
2021-04-11 16:44:11,168 - INFO - User requested start debug session with {}
2021-04-11 16:44:11,169 - DEBUG - Reading configurations from: None
2021-04-11 16:44:11,169 - DEBUG - Reading configurations from: /Users/ben/.vim/bundle/vimspector/support/test/csharp/.vimspector.json
2021-04-11 16:44:11,171 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.json
2021-04-11 16:44:11,227 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/lldb-vscode.json
2021-04-11 16:44:11,228 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/mono.json
2021-04-11 16:44:11,228 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/netcoredbg.json
2021-04-11 16:44:11,229 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vim-debug-adapter.json
2021-04-11 16:44:11,229 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-cpptools.json
2021-04-11 16:44:11,229 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-javac.json
2021-04-11 16:44:11,230 - DEBUG - Reading gadget config: None
2021-04-11 16:44:12,292 - INFO - Configuration: {"adapter": "netcoredbg", "configuration": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true}}
2021-04-11 16:44:12,292 - INFO - Adapter: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "configuration": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp"}, "name": "netcoredbg"}
2021-04-11 16:44:12,293 - DEBUG - min_width/height: 149/55, actual: 272/68 - result: horizontal
2021-04-11 16:44:12,392 - DEBUG - LAUNCH!
2021-04-11 16:44:12,393 - INFO - Starting debug adapter with: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "configuration": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp"}, "name": "netcoredbg"}
2021-04-11 16:44:12,394 - DEBUG - Connection Type: job
2021-04-11 16:44:12,402 - INFO - Debug Adapter Started
2021-04-11 16:44:12,402 - DEBUG - Sending Message: {"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"}
2021-04-11 16:44:12,425 - DEBUG - Message received: {'seq': 1, 'body': {'capabilities': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True, 'supportsSetVariable': True}}, 'event': 'capabilities', 'type': 'event'}
2021-04-11 16:44:12,426 - DEBUG - Message received: {'seq': 2, 'body': {}, 'event': 'initialized', 'type': 'event'}
2021-04-11 16:44:12,426 - DEBUG - Sending Message: {"command": "setBreakpoints", "arguments": {"source": {"name": "Program.cs", "path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"}, "breakpoints": [{"line": 31}]}, "sourceModified": false, "seq": 1, "type": "request"}
2021-04-11 16:44:12,426 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 2, "type": "request"}
2021-04-11 16:44:12,426 - DEBUG - Message received: {'seq': 3, 'body': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True, 'supportsSetVariable': True}, 'command': 'initialize', 'request_seq': 0, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,426 - DEBUG - Sending Message: {"command": "launch", "arguments": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp", "request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true, "name": "test"}, "seq": 3, "type": "request"}
2021-04-11 16:44:12,440 - DEBUG - Message received: {'seq': 4, 'body': {'breakpoints': [{'id': 1, 'line': 31, 'message': 'The breakpoint is pending and will be resolved when debugging starts.', 'verified': False}]}, 'command': 'setBreakpoints', 'request_seq': 1, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,440 - DEBUG - Breakpoints at this point: {
"/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs": [
{
"id": 1,
"line": 31,
"message": "The breakpoint is pending and will be resolved when debugging starts.",
"verified": false,
"source": {
"name": "Program.cs",
"path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"
}
}
]
}
2021-04-11 16:44:12,440 - DEBUG - Message received: {'seq': 5, 'body': {'supportsExceptionOptions': False}, 'command': 'setExceptionBreakpoints', 'request_seq': 2, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,440 - DEBUG - Sending Message: {"command": "configurationDone", "seq": 4, "type": "request"}
2021-04-11 16:44:12,440 - DEBUG - Message received: {'seq': 6, 'body': {}, 'command': 'launch', 'request_seq': 3, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,444 - INFO - The server has terminated with status -1
As you can see, the netcoredbg ("server") exits with status -1 immediately after sending the response to the launch
request.
With the previous version, this is the (working) log:
2021-04-11 16:44:07,573 - INFO - **** INITIALISING NEW VIMSPECTOR SESSION ****
2021-04-11 16:44:07,573 - INFO - API is:
2021-04-11 16:44:07,574 - INFO - VIMSPECTOR_HOME = /Users/ben/.vim/vimspector-conf
2021-04-11 16:44:07,574 - INFO - gadgetDir = /Users/ben/.vim/vimspector-conf/gadgets/macos
2021-04-11 16:44:07,574 - INFO - User requested start debug session with {}
2021-04-11 16:44:07,575 - DEBUG - Reading configurations from: None
2021-04-11 16:44:07,575 - DEBUG - Reading configurations from: /Users/ben/.vim/bundle/vimspector/support/test/csharp/.vimspector.json
2021-04-11 16:44:07,576 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.json
2021-04-11 16:44:07,635 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/lldb-vscode.json
2021-04-11 16:44:07,636 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/mono.json
2021-04-11 16:44:07,637 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/netcoredbg.json
2021-04-11 16:44:07,637 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vim-debug-adapter.json
2021-04-11 16:44:07,637 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-cpptools.json
2021-04-11 16:44:07,638 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-javac.json
2021-04-11 16:44:07,638 - DEBUG - Reading gadget config: None
2021-04-11 16:44:11,168 - INFO - User requested start debug session with {}
2021-04-11 16:44:11,169 - DEBUG - Reading configurations from: None
2021-04-11 16:44:11,169 - DEBUG - Reading configurations from: /Users/ben/.vim/bundle/vimspector/support/test/csharp/.vimspector.json
2021-04-11 16:44:11,171 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.json
2021-04-11 16:44:11,227 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/lldb-vscode.json
2021-04-11 16:44:11,228 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/mono.json
2021-04-11 16:44:11,228 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/netcoredbg.json
2021-04-11 16:44:11,229 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vim-debug-adapter.json
2021-04-11 16:44:11,229 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-cpptools.json
2021-04-11 16:44:11,229 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-javac.json
2021-04-11 16:44:11,230 - DEBUG - Reading gadget config: None
2021-04-11 16:44:12,292 - INFO - Configuration: {"adapter": "netcoredbg", "configuration": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true}}
2021-04-11 16:44:12,292 - INFO - Adapter: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "configuration": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp"}, "name": "netcoredbg"}
2021-04-11 16:44:12,293 - DEBUG - min_width/height: 149/55, actual: 272/68 - result: horizontal
2021-04-11 16:44:12,392 - DEBUG - LAUNCH!
2021-04-11 16:44:12,393 - INFO - Starting debug adapter with: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "configuration": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp"}, "name": "netcoredbg"}
2021-04-11 16:44:12,394 - DEBUG - Connection Type: job
2021-04-11 16:44:12,402 - INFO - Debug Adapter Started
2021-04-11 16:44:12,402 - DEBUG - Sending Message: {"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"}
2021-04-11 16:44:12,425 - DEBUG - Message received: {'seq': 1, 'body': {'capabilities': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True, 'supportsSetVariable': True}}, 'event': 'capabilities', 'type': 'event'}
2021-04-11 16:44:12,426 - DEBUG - Message received: {'seq': 2, 'body': {}, 'event': 'initialized', 'type': 'event'}
2021-04-11 16:44:12,426 - DEBUG - Sending Message: {"command": "setBreakpoints", "arguments": {"source": {"name": "Program.cs", "path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"}, "breakpoints": [{"line": 31}]}, "sourceModified": false, "seq": 1, "type": "request"}
2021-04-11 16:44:12,426 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 2, "type": "request"}
2021-04-11 16:44:12,426 - DEBUG - Message received: {'seq': 3, 'body': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True, 'supportsSetVariable': True}, 'command': 'initialize', 'request_seq': 0, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,426 - DEBUG - Sending Message: {"command": "launch", "arguments": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp", "request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true, "name": "test"}, "seq": 3, "type": "request"}
2021-04-11 16:44:12,440 - DEBUG - Message received: {'seq': 4, 'body': {'breakpoints': [{'id': 1, 'line': 31, 'message': 'The breakpoint is pending and will be resolved when debugging starts.', 'verified': False}]}, 'command': 'setBreakpoints', 'request_seq': 1, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,440 - DEBUG - Breakpoints at this point: {
"/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs": [
{
"id": 1,
"line": 31,
"message": "The breakpoint is pending and will be resolved when debugging starts.",
"verified": false,
"source": {
"name": "Program.cs",
"path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"
}
}
]
}
2021-04-11 16:44:12,440 - DEBUG - Message received: {'seq': 5, 'body': {'supportsExceptionOptions': False}, 'command': 'setExceptionBreakpoints', 'request_seq': 2, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,440 - DEBUG - Sending Message: {"command": "configurationDone", "seq": 4, "type": "request"}
2021-04-11 16:44:12,440 - DEBUG - Message received: {'seq': 6, 'body': {}, 'command': 'launch', 'request_seq': 3, 'success': True, 'type': 'response'}
2021-04-11 16:44:12,444 - INFO - The server has terminated with status -1
2021-04-11 16:44:12,446 - DEBUG - Closing down: Aborting request {'command': 'configurationDone', 'seq': 4, 'type': 'request'}
2021-04-11 16:44:12,446 - INFO - User Msg: Request for configurationDone aborted: Closing down
2021-04-11 16:44:12,449 - DEBUG - No server exit handler
2021-04-11 16:45:10,780 - INFO - Debugging complete.
2021-04-11 16:45:10,781 - DEBUG - Clearing down UI
2021-04-11 16:45:13,052 - INFO - User Msg: Vimspector gadget installation complete!
2021-04-11 16:45:14,329 - INFO - User requested start debug session with {}
2021-04-11 16:45:14,329 - DEBUG - Reading configurations from: None
2021-04-11 16:45:14,330 - DEBUG - Reading configurations from: /Users/ben/.vim/bundle/vimspector/support/test/csharp/.vimspector.json
2021-04-11 16:45:14,331 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.json
2021-04-11 16:45:14,388 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/lldb-vscode.json
2021-04-11 16:45:14,389 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/mono.json
2021-04-11 16:45:14,389 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/netcoredbg.json
2021-04-11 16:45:14,390 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vim-debug-adapter.json
2021-04-11 16:45:14,390 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-cpptools.json
2021-04-11 16:45:14,390 - DEBUG - Reading gadget config: /Users/ben/.vim/vimspector-conf/gadgets/macos/.gadgets.d/vscode-javac.json
2021-04-11 16:45:14,391 - DEBUG - Reading gadget config: None
2021-04-11 16:45:15,678 - INFO - Configuration: {"adapter": "netcoredbg", "configuration": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true}}
2021-04-11 16:45:15,678 - INFO - Adapter: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "configuration": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp"}, "name": "netcoredbg"}
2021-04-11 16:45:15,679 - DEBUG - min_width/height: 149/55, actual: 272/68 - result: horizontal
2021-04-11 16:45:15,802 - DEBUG - LAUNCH!
2021-04-11 16:45:15,803 - INFO - Starting debug adapter with: {"attach": {"pidProperty": "processId", "pidSelect": "ask"}, "command": ["/Users/ben/.vim/vimspector-conf/gadgets/macos/netcoredbg/netcoredbg", "--interpreter=vscode"], "configuration": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp"}, "name": "netcoredbg"}
2021-04-11 16:45:15,803 - DEBUG - Connection Type: job
2021-04-11 16:45:15,812 - INFO - Debug Adapter Started
2021-04-11 16:45:15,812 - DEBUG - Sending Message: {"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"}
2021-04-11 16:45:16,047 - DEBUG - Message received: {'seq': 1, 'body': {'capabilities': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True}}, 'event': 'capabilities', 'type': 'event'}
2021-04-11 16:45:16,047 - DEBUG - Message received: {'seq': 2, 'body': {}, 'event': 'initialized', 'type': 'event'}
2021-04-11 16:45:16,048 - DEBUG - Sending Message: {"command": "setBreakpoints", "arguments": {"source": {"name": "Program.cs", "path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"}, "breakpoints": [{"line": 31}]}, "sourceModified": false, "seq": 1, "type": "request"}
2021-04-11 16:45:16,048 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 2, "type": "request"}
2021-04-11 16:45:16,048 - DEBUG - Message received: {'seq': 3, 'body': {'supportTerminateDebuggee': True, 'supportsConditionalBreakpoints': True, 'supportsConfigurationDoneRequest': True, 'supportsExceptionInfoRequest': True, 'supportsFunctionBreakpoints': True}, 'command': 'initialize', 'request_seq': 0, 'success': True, 'type': 'response'}
2021-04-11 16:45:16,048 - DEBUG - Sending Message: {"command": "launch", "arguments": {"cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp", "request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll", "args": [], "stopAtEntry": true, "name": "test"}, "seq": 3, "type": "request"}
2021-04-11 16:45:16,064 - DEBUG - Message received: {'seq': 4, 'body': {'breakpoints': [{'id': 1, 'line': 31, 'message': 'The breakpoint is pending and will be resolved when debugging starts.', 'verified': False}]}, 'command': 'setBreakpoints', 'request_seq': 1, 'success': True, 'type': 'response'}
2021-04-11 16:45:16,065 - DEBUG - Breakpoints at this point: {
"/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs": [
{
"id": 1,
"line": 31,
"message": "The breakpoint is pending and will be resolved when debugging starts.",
"verified": false,
"source": {
"name": "Program.cs",
"path": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs"
}
}
]
}
2021-04-11 16:45:16,066 - DEBUG - Message received: {'seq': 5, 'body': {'supportsExceptionOptions': False}, 'command': 'setExceptionBreakpoints', 'request_seq': 2, 'success': True, 'type': 'response'}
2021-04-11 16:45:16,066 - DEBUG - Sending Message: {"command": "configurationDone", "seq": 4, "type": "request"}
2021-04-11 16:45:16,066 - DEBUG - Message received: {'seq': 6, 'body': {}, 'command': 'launch', 'request_seq': 3, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,362 - DEBUG - Message received: {'seq': 7, 'body': {}, 'command': 'configurationDone', 'request_seq': 4, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,362 - DEBUG - Sending Message: {"command": "threads", "seq": 5, "type": "request"}
2021-04-11 16:45:17,375 - DEBUG - Message received: {'seq': 8, 'body': {'threads': []}, 'command': 'threads', 'request_seq': 5, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,376 - INFO - User Msg: Protocol error: Server returned no threads
2021-04-11 16:45:17,478 - DEBUG - Message received: {'seq': 9, 'body': {'module': {'id': 'cbf09656-4141-4643-9b7d-f785b9d4a77e', 'name': 'System.Private.CoreLib.dll', 'path': '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.2.7/System.Private.CoreLib.dll', 'symbolStatus': 'Symbols not found.'}, 'reason': 'new'}, 'event': 'module', 'type': 'event'}
2021-04-11 16:45:17,480 - DEBUG - Message received: {'seq': 10, 'body': {'reason': 'started', 'threadId': 4654089}, 'event': 'thread', 'type': 'event'}
2021-04-11 16:45:17,481 - DEBUG - Sending Message: {"command": "threads", "seq": 6, "type": "request"}
2021-04-11 16:45:17,484 - DEBUG - Message received: {'seq': 11, 'body': {'threads': [{'id': 4654146, 'name': '<No name>'}, {'id': 4654089, 'name': '<No name>'}]}, 'command': 'threads', 'request_seq': 6, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,543 - DEBUG - Message received: {'seq': 12, 'body': {'module': {'id': 'cfef6d56-aea1-4bff-961f-218e6cf66267', 'name': 'csharp.dll', 'path': '/Users/ben/.vim/bundle/vimspector/support/test/csharp/bin/Debug/netcoreapp2.2/csharp.dll', 'symbolStatus': 'Symbols loaded.'}, 'reason': 'new'}, 'event': 'module', 'type': 'event'}
2021-04-11 16:45:17,553 - DEBUG - Message received: {'seq': 13, 'body': {'breakpoint': {'endLine': 31, 'id': 1, 'line': 31, 'message': '', 'source': {'name': 'Program.cs', 'path': '/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs'}, 'verified': True}, 'reason': 'changed'}, 'event': 'breakpoint', 'type': 'event'}
2021-04-11 16:45:17,561 - DEBUG - Message received: {'seq': 14, 'body': {'module': {'id': '7e13846a-8909-4655-a2a4-d40c671844a6', 'name': 'System.Runtime.dll', 'path': '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.2.7/System.Runtime.dll', 'symbolStatus': 'Symbols not found.'}, 'reason': 'new'}, 'event': 'module', 'type': 'event'}
2021-04-11 16:45:17,601 - DEBUG - Message received: {'seq': 15, 'body': {'allThreadsStopped': True, 'description': '', 'reason': 'entry', 'text': '', 'threadId': 4654089}, 'event': 'stopped', 'type': 'event'}
2021-04-11 16:45:17,602 - WARNING - User Msg: Paused in thread 4654089 due to entry
2021-04-11 16:45:17,609 - DEBUG - Sending Message: {"command": "threads", "seq": 7, "type": "request"}
2021-04-11 16:45:17,622 - DEBUG - Message received: {'seq': 16, 'body': {'threads': [{'id': 4654146, 'name': '<No name>'}, {'id': 4654162, 'name': '<No name>'}, {'id': 4654089, 'name': '<No name>'}]}, 'command': 'threads', 'request_seq': 7, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,622 - DEBUG - Sending Message: {"command": "stackTrace", "arguments": {"threadId": 4654089}, "seq": 8, "type": "request"}
2021-04-11 16:45:17,636 - DEBUG - Message received: {'seq': 17, 'body': {'stackFrames': [{'column': 5, 'endColumn': 6, 'endLine': 30, 'id': 19989160047673344, 'line': 30, 'moduleId': 'cfef6d56-aea1-4bff-961f-218e6cf66267', 'name': 'csharp.Program.Main()', 'source': {'name': 'Program.cs', 'path': '/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.cs'}}], 'totalFrames': 1}, 'command': 'stackTrace', 'request_seq': 8, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,654 - DEBUG - Sending Message: {"command": "scopes", "arguments": {"frameId": 19989160047673344}, "seq": 9, "type": "request"}
2021-04-11 16:45:17,658 - DEBUG - Message received: {'seq': 18, 'body': {'scopes': [{'name': 'Locals', 'namedVariables': 2, 'variablesReference': 1}]}, 'command': 'scopes', 'request_seq': 9, 'success': True, 'type': 'response'}
2021-04-11 16:45:17,658 - DEBUG - Sending Message: {"command": "variables", "arguments": {"variablesReference": 1}, "seq": 10, "type": "request"}
2021-04-11 16:45:17,672 - DEBUG - Message received: {'seq': 19, 'body': {'variables': [{'evaluateName': 'args', 'name': 'args', 'type': 'string[]', 'value': '{string[0]}', 'variablesReference': 0}, {'evaluateName': 'p', 'name': 'p', 'namedVariables': 1, 'type': 'csharp.Program', 'value': 'null', 'variablesReference': 2}]}, 'command': 'variables', 'request_seq': 10, 'success': True, 'type': 'response'}
After enabling logging in netcoredbg
(with --log
) I would that it's throwing an exception and exiting.
2417944.303 I/NETCOREDBG(P22162, T4294967295): main.cpp: main(345) > Netcoredbg started
2417944.303 I/NETCOREDBG(P22162, T4294967295): main.cpp: instantiate_protocol(109) > Creating protocol VSCodeProtocol
2417944.303 I/NETCOREDBG(P22162, T4294967295): ioredirect.cpp: worker(145) > worker started
2417944.303 I/NETCOREDBG(P22162, T4294967295): main.cpp: main(372) > pidDebugee 0
2417944.322 I/NETCOREDBG(P22162, T4294967295): vscodeprotocol.cpp: operator(490) > exception '[json.exception.out_of_range.403] key 'env' not found'
It seems that the env
key is now mandatory. this happened before with the cwd
key. Can we make it not mandatory?
I see that invocations of initialize
will emit the capabilities event. However, the spec also allows to return the capabilities as a response (and even kind of recommends it as the capabilities
event isn't at all involved in the sequence described in https://microsoft.github.io/debug-adapter-protocol/specification for "Initialized Event").
Not having capabilities at that time makes processing by clients more complex and error-prone.
Please make the the capabilities are also returned (and not only emitted) as a response to initialize
.
According to official specifications (https://microsoft.github.io/debug-adapter-protocol/overview) debugger should accept first 'configurationDone' request and then 'launch' request.
From my tests seems that I need to send the 'launch' request before 'configurationDone' request to correctly start the debugger.
This is the sequence of configurationDone first and getting an error:
-> {"command":"initialize","seq":1,"type":"Request"}
<- {"body":{},"event":"initialized","seq":1,"type":"event"}
<- {"body":{"supportTerminateDebuggee":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true},"command":"initialize","request_seq":1,"seq":2,"success":true,"type":"response"}
-> {"command":"configurationDone","seq":2,"type":"Request"}
<- {"command":"configurationDone","message":"Failed command 'configurationDone' : 0x80004005","request_seq":2,"seq":3,"success":false,"type":"response"}
-> {"arguments":{},"command":"launch","seq":3,"type":"Request"}
<- {"body":{},"command":"launch","request_seq":3,"seq":4,"success":true,"type":"response"}
while sending 'launch' before 'configurationDone' works fine:
-> {"command":"initialize","seq":1,"type":"Request"}
<- {"body":{},"event":"initialized","seq":1,"type":"event"}
<- {"body":{"supportTerminateDebuggee":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true},"command":"initialize","request_seq":1,"seq":2,"success":true,"type":"response"} {"arguments":{},"command":"launch","seq":2,"type":"Request"}
<- {"body":{},"command":"launch","request_seq":2,"seq":3,"success":true,"type":"response"} {"command":"configurationDone","seq":3,"type":"Request"}
<- {"body":{},"command":"configurationDone","request_seq":3,"seq":4,"success":true,"type":"response"}
<- {"body":{"module":{"id":"341dfe22-562e-4db3-8729-b233a8cd1a5f","name":"System.Private.CoreLib.dll","path":"C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\2.1.6\\System.Private.CoreLib.dll","symbolStatus":"Skipped loading symbols."},"reason":"new"},"event":"module","seq":5,"type":"event"}
....
Is there any error on my side?
I have just tried to compile in MacOS, and it doesn't report any error, but doesn't create the bin folder.
I attach the output of cmake.
Versions: MacOS Mojave 10.14.6
XCode 10.3
cc -v
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.