-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set breakpoints "Cannot perform runtime binding on a null reference" #70
Comments
using System;
namespace csharp
{
class Program
{
string toaster = "Making round of toast";
static int max_bread = 100;
int bread = max_bread;
void PrintToast( int r ) {
int this_round = ( max_bread - bread - r);
Console.WriteLine( this.toaster + ": " + this_round );
}
void MakeToast( int rounds ) {
if (this.bread - rounds < 0) {
throw new Exception( "No moar bread!" );
}
this.bread -= rounds;
for (int r = 0; r < rounds; ++r) {
this.PrintToast( r );
}
Console.WriteLine( "Got only " + this.bread + " left" );
}
static void Main(string[] args)
{
Program p = new Program();
for (int x = 1; x < 10; ++ x) {
p.MakeToast( x );
}
}
}
} compiled with OS: macOS Big Sur
|
with
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setting breakpoints is failing using this test program and
vscode-mono-debug
v0.16.2 and a non-vscode client vimspectorThe failure response is:
To break down the flow:
mono Users/ben/.vim/vimspector-conf/gadgets/macos/vscode-mono-debug/bin/Release/mono-debug.exe
2020-11-16 21:20:27,565 - DEBUG - Sending Message: {"command": "initialize", "arguments": {"adapterID": "mono-debug", "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-16 21:20:28,113 - DEBUG - Message received: {'success': True, 'message': None, 'request_seq': 0, 'command': 'initialize', 'body': {'supportsConfigurationDoneRequest': False, 'supportsFunctionBreakpoints': False, 'supportsConditionalBreakpoints': False, 'supportsEvaluateForHovers': False, 'exceptionBreakpointFilters': []}, 'seq': 1, 'type': 'response'}
So far so good.
2020-11-16 21:20:28,114 - DEBUG - Sending Message: {"command": "launch", "arguments": {"request": "launch", "program": "/Users/ben/.vim/bundle/vimspector/support/test/csharp/Program.exe", "console": "integratedTerminal", "cwd": "/Users/ben/.vim/bundle/vimspector/support/test/csharp", "args": [], "env": {}, "name": "test"}, "seq": 1, "type": "request"}
2020-11-16 21:20:28,118 - DEBUG - Message received: {'seq': 2, 'type': 'event', 'event': 'initialized', 'body': None}
2020-11-16 21:20:28,119 - 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": 2, "type": "request"}
2020-11-16 21:20:28,119 - DEBUG - Sending Message: {"command": "setExceptionBreakpoints", "arguments": {"filters": []}, "seq": 3, "type": "request"}
This is where it starts to go wrong.
First, we receive a duplicate response to the
initialize
request:This is bad, but the client just ignores it, so whatever.
We then get a runInTerminal request:
2020-11-16 21:20:28,296 - DEBUG - Message received: {'command': 'runInTerminal', 'arguments': {'kind': 'integrated', 'title': 'Node Debug Console', 'cwd': '/Users/ben/.vim/bundle/vimspector/support/test/csharp', 'args': ['mono', '--debug', '--debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:57681', 'Program.exe'], 'env': None}, 'seq': 3, 'type': 'request'}
And send a response
2020-11-16 21:20:28,309 - DEBUG - Sending Message: {"seq": 4, "type": "response", "request_seq": 3, "command": "runInTerminal", "body": {"processId": 74070}, "success": true}
That's all fine, and we get a response to the
launch
request:2020-11-16 21:20:28,310 - DEBUG - Message received: {'success': True, 'message': None, 'request_seq': 1, 'command': 'launch', 'body': None, 'seq': 4, 'type': 'response'}
But then we get rejections for the breakpoints request from earlier:
2020-11-16 21:20:28,332 - DEBUG - Message received: {'success': False, 'message': "error while processing request 'setBreakpoints' (exception: Cannot perform runtime binding on a null reference)", 'request_seq': 2, 'command': 'setBreakpoints', 'body': {'error': {'id': 1104, 'format': "error while processing request '{_request}' (exception: {_exception})", 'variables': {'_request': 'setBreakpoints', '_exception': 'Cannot perform runtime binding on a null reference'}, 'showUser': True, 'sendTelemetry': False}}, 'seq': 5, 'type': 'response'}
But then we get a duplicate of that message:
And finally the exception breakpoints request is accepted:
2020-11-16 21:20:28,336 - DEBUG - Message received: {'success': True, 'message': None, 'request_seq': 3, 'command': 'setExceptionBreakpoints', 'body': None, 'seq': 6, 'type': 'response'}
Subsequently there are other problems like duplicate responses to the
threads
request and such, but the inability to set breakpoints seems the most severe.Full log including DAP trace:
The text was updated successfully, but these errors were encountered: