vscode-dotnet-test-explorer icon indicating copy to clipboard operation
vscode-dotnet-test-explorer copied to clipboard

Fix waiting debugger string

Open Titaye opened this issue 4 years ago • 5 comments

Fixes #247

Titaye avatar Jun 16 '20 06:06 Titaye

Hi and thanks for the PR! I'm not sure I understand how this will fix the debug capability. Care to ellaborate?

stefanforsberg avatar Jun 16 '20 19:06 stefanforsberg

Hi,

The debug executor is listening to dotnet test stdout waiting for a specific keyword in order to attach vscode to dotnet process. The previous keyword was never raised by the dotnet process, so the runner was waiting indefinitely. "Please attach debugger to testhost process to continue" is a sentence raised by the dotnet process. Waiting for this string allows the extension to detect that the dotnet process is ready to attach.

On Tue, Jun 16, 2020, 21:11 Stefan Forsberg [email protected] wrote:

Hi and thanks for the PR! I'm not sure I understand how this will fix the debug capability. Care to ellaborate?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/formulahendry/vscode-dotnet-test-explorer/pull/273#issuecomment-644959409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB35CXVEJIFOVSGTPFTP6LRW67WBANCNFSM4N7JDKJA .

Titaye avatar Jun 16 '20 19:06 Titaye

So that will make sure that we don't get stuck waiting for the debugger to attach but it won't actually attach to anything and hence not debug. While technically it's a fix for getting stuck it doesn't really fix the debug functionality.

stefanforsberg avatar Jun 18 '20 19:06 stefanforsberg

Why are you telling it won't attach ? The process id to attach was already correctly detected. https://github.com/formulahendry/vscode-dotnet-test-explorer/blob/610b78620a5d07866f6baf24a0879542968e3b73/src/debug.ts#L28

The previous code was just wrongly waiting. Now the waiting is fixed and the rest of the code is correctly attaching to the process. https://github.com/formulahendry/vscode-dotnet-test-explorer/blob/610b78620a5d07866f6baf24a0879542968e3b73/src/executor.ts#L87

On Thu, Jun 18, 2020, 21:28 Stefan Forsberg [email protected] wrote:

So that will make sure that we don't get stuck waiting for the debugger to attach but it won't actually attach to anything and hence not debug. While technically it's a fix for getting stuck it doesn't really fix the debug functionality.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/formulahendry/vscode-dotnet-test-explorer/pull/273#issuecomment-646262116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB35CWYKDDWSIIU6FF2H5LRXJTE3ANCNFSM4N7JDKJA .

Titaye avatar Jun 18 '20 20:06 Titaye

Maybe I'm missing something here. Just to maybe clear things up for me:

Have you installed the c# extension? Which version of the dotnet sdk are you using?

stefanforsberg avatar Jun 18 '20 20:06 stefanforsberg