CSharpEditor icon indicating copy to clipboard operation
CSharpEditor copied to clipboard

Breakpoint doesn't work in Top-level statements

Open kinglionsoft opened this issue 2 years ago • 2 comments

Nice work! It seems that Breakpoint doesn't work Top-level statements (programs without Main methods).

string localVariable = "Hello world!";

 /* Breakpoint */
Console.WriteLine(localVariable);

kinglionsoft avatar Jun 13 '23 13:06 kinglionsoft

https://github.com/arklumpus/CSharpEditor/blob/5af79d42f275f04dd84d602410b6d63ac77bda8e/CSharpEditor/Editor.public.cs#LL582C34-L582C34

No SyntaxKind.MethodDeclaration found.

kinglionsoft avatar Jun 13 '23 13:06 kinglionsoft

Hi! Thanks for pointing this out, I have changed the code to allow (synchronous) breakpoints in top-level statements.

I pushed a new version 1.1.6-a1 to Nuget with this fix (it might take a few minutes to appear).

arklumpus avatar Jun 18 '23 13:06 arklumpus