Update mono debug; even though it doesn't work

This commit is contained in:
Ben Jackson 2020-11-16 21:17:22 +00:00
commit cd3b5f5baa
5 changed files with 61 additions and 17 deletions

View file

@ -295,9 +295,16 @@ class ProjectBreakpoints( object ):
awaiting = 0 awaiting = 0
def response_received(): def response_received( *failure_args ):
nonlocal awaiting nonlocal awaiting
awaiting = awaiting - 1 awaiting = awaiting - 1
if failure_args and self._connection:
reason, msg = failure_args
utils.UserMessage( 'Unable to set breakpoint: {0}'.format( reason ),
persist = True,
error = True )
if awaiting == 0 and doneHandler: if awaiting == 0 and doneHandler:
doneHandler() doneHandler()
@ -364,7 +371,7 @@ class ProjectBreakpoints( object ):
}, },
'sourceModified': False, # TODO: We can actually check this 'sourceModified': False, # TODO: We can actually check this
}, },
failure_handler = lambda *_: response_received() failure_handler = response_received
) )
# TODO: Add the _configured_breakpoints to function breakpoints # TODO: Add the _configured_breakpoints to function breakpoints
@ -388,7 +395,7 @@ class ProjectBreakpoints( object ):
'breakpoints': breakpoints, 'breakpoints': breakpoints,
} }
}, },
failure_handler = lambda *_: response_received() failure_handler = response_received
) )
if self._exception_breakpoints: if self._exception_breakpoints:
@ -399,7 +406,7 @@ class ProjectBreakpoints( object ):
'command': 'setExceptionBreakpoints', 'command': 'setExceptionBreakpoints',
'arguments': self._exception_breakpoints 'arguments': self._exception_breakpoints
}, },
failure_handler = lambda *_: response_received() failure_handler = response_received
) )
if awaiting == 0 and doneHandler: if awaiting == 0 and doneHandler:

View file

@ -237,7 +237,8 @@ GADGETS = {
}, },
'macos': { 'macos': {
'file_name': 'netcoredbg-osx.tar.gz', 'file_name': 'netcoredbg-osx.tar.gz',
'checksum': '', 'checksum':
'71c773e34d358950f25119bade7e3081c4c2f9d71847bd49027ca5792e918beb',
}, },
'linux': { 'linux': {
'file_name': 'netcoredbg-linux-bionic.tar.gz', 'file_name': 'netcoredbg-linux-bionic.tar.gz',
@ -279,9 +280,9 @@ GADGETS = {
}, },
'all': { 'all': {
'file_name': 'vscode-mono-debug.vsix', 'file_name': 'vscode-mono-debug.vsix',
'version': '0.15.8', 'version': '0.16.2',
'checksum': 'checksum':
'723eb2b621b99d65a24f215cb64b45f5fe694105613a900a03c859a62a810470', '121eca297d83daeeb1e6e1d791305d1827998dbd595c330086b3b94d33dba3b9',
}, },
'adapters': { 'adapters': {
'vscode-mono-debug': { 'vscode-mono-debug': {
@ -293,6 +294,12 @@ GADGETS = {
"attach": { "attach": {
"pidSelect": "none" "pidSelect": "none"
}, },
"configuration": {
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"args": [],
"env": {}
}
}, },
} }
}, },

View file

@ -1,5 +1,6 @@
from vimspector import utils, settings from vimspector import utils, settings
import os
import vim import vim
@ -17,9 +18,9 @@ def LaunchTerminal( api_prefix,
else: else:
term = existing_term term = existing_term
cwd = params[ 'cwd' ] cwd = params[ 'cwd' ] or os.getcwd()
args = params[ 'args' ] args = params[ 'args' ] or []
env = params.get( 'env', {} ) env = params.get( 'env' ) or {}
term_options = { term_options = {
'vertical': 1, 'vertical': 1,

View file

@ -13,7 +13,11 @@
"adapter": "vscode-mono-debug", "adapter": "vscode-mono-debug",
"configuration": { "configuration": {
"request": "launch", "request": "launch",
"program": "${workspaceRoot}/Program.exe" "program": "${workspaceRoot}/Program.exe",
"console": "integratedTerminal",
"cwd": "${workspaceRoot}",
"args": [],
"env": {}
} }
} }
} }

View file

@ -2,11 +2,36 @@
namespace csharp namespace csharp
{ {
class Program class Program
{ {
static void Main(string[] args) string toaster = "Making round of toast";
{ static int max_bread = 100;
Console.WriteLine("Hello World!"); 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 );
}
}
}
} }