hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

'No active debug session'. Debug breaks on Visual Studio Code February 2019 (version 1.32.1) #31

Closed BrightSoul closed 5 years ago

BrightSoul commented 5 years ago

As soon as I update to Visual Studio Code version 1.32.1 on Windows 10, I can't debug tests anymore. I click on "Debug" in the code lens but nothing happens. Breakpoints are not hit. And the same happens when I click the "bug" icon in the test explorer.

Here's the output from the "Jasmine Explorer Log" panel. As you can see, there's an "[ERROR] No active debug session - aborting" in there.

[2019-03-08 17:23:13.087] [INFO] Debugging test(s) ["my test"] of c:\MyProject
[2019-03-08 17:23:13.087] [INFO] Running test(s) ["my test"] of c:\MyProject
[2019-03-08 17:23:13.092] [INFO] Starting the debug session
[2019-03-08 17:23:13.807] [ERROR] No active debug session - aborting
[2019-03-08 17:23:13.807] [INFO] Killing running test process
[2019-03-08 17:23:13.821] [INFO] Worker finished

I could replicate this problem on two different PCs. This happens with the default settings. I tried changing them in various ways but nothing seemed to help.

When I revert to the previous version of Visual Studio Code (January 2019), the debugger is fully functional again. So, in the meantime I've just blocked automatic updates.

0xbarrett commented 5 years ago

I can confirm this also occurs on the MacOS version 1.32.1 of VS Code. Here's the error shown in the developer tools:

console.ts:134 [Extension Host] undefined session received in acceptDebugSessionStarted
t.log @ console.ts:134
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:390
_invokeHandler @ rpcProtocol.ts:375
_receiveRequest @ rpcProtocol.ts:295
_receiveOneMessage @ rpcProtocol.ts:225
_protocol.onMessage.e @ rpcProtocol.ts:100
fire @ event.ts:584
r @ ipc.net.ts:295
e @ ipc.net.ts:302
fire @ event.ts:584
o @ ipc.net.ts:103
_socketDataListener.e @ ipc.net.ts:132
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
hbenl commented 5 years ago

This is due to Microsoft/vscode#70125. I have added a workaround in version 1.4.2, so after updating Jasmine adapter, debugging will work again.