maziac / DeZog

Visual Studio Code Debugger for Z80/ZX Spectrum.
MIT License
210 stars 34 forks source link

"cannot find session" #91

Closed maziac closed 2 years ago

maziac commented 2 years ago

DeZog 2.7.0 (also on develop branch).

  1. Start a project, e.g. z80-sampleproject
  2. Change something in launch.json.
  3. Re-start project.4.

Result: Bildschirmfoto 2022-05-23 um 13 15 15

This does not happen on normal restart. The launch.json need to be changed. This causes 'resolveDebugConfiguration' to be called. Probably this has to do with the problem.

Could be a vscode problem, see here: https://github.com/microsoft/vscode/issues/136200

Workaround: On next start of the debugger everything is working fine.

maziac commented 2 years ago

Some more investigations: It seems that without changing the launch.json the debug adapter gets a disconnectRequest and then a launchRequest (note: supportsRestartRequest is false). In case the launch.json is changed it does not get the disconnectRequest.

maziac commented 2 years ago

With 3.0 this was fixed. But also the behavior is different now: If a restart is done and the launch.json was changed that the user is asked if he would like to terminate the current session. If yes, the session is terminated and the sequence ends here. I.e. the user has to press 'start' once again. Note: this only happens if the launch.json was changed. If it is untouched a restart really restarts the debug session.