AoCHelper icon indicating copy to clipboard operation
AoCHelper copied to clipboard

IOException thrown by Solver.SolveLast when debugging in VS Code

Open clrudolphi opened this issue 2 years ago • 3 comments

Just installed AocHelper and using the Template. When attempting to debug my code, the SolveLast method throws an IOException when attempting to set the cursor visibility. image

This project has run successfully when not using the debugger. This same code, when debugged using Visual Studio, will run just fine (debugger behaves without throwing the exception).

I suspect this is some configuration or installation problem on my end with VSCode. Have you seen anything like this before?

clrudolphi avatar Dec 02 '23 02:12 clrudolphi

Hi @clrudolphi,

I did see this before, in https://github.com/spectreconsole/spectre.console/issues/151, but that was inside of a GH Actions runner.

Let me investigate a bit more which part of the rendering code causes this

eduherminio avatar Dec 02 '23 12:12 eduherminio

This happens during AnsiConsole.Live(table), which is the key part of AoCHelper. I can reproduce it myself as well, so it's not an issue with your VSCode installation.

I opened a bug in sprectre.console about this to try to understand if this is the expected behavior, I hope we can provide a solution soon to be able to debug from VSCode as well.

eduherminio avatar Dec 02 '23 13:12 eduherminio

If you run into this issue, as a workaround, you can just configure the VSCode setting Csharp › Debug: Console to NOT be internalConsole.

"csharp.debug.console": "integratedTerminal"

vsilvar avatar Dec 11 '23 10:12 vsilvar