otris/vscode-janus-debug

Problems with source mapping when launch and attach is mixed with a running script

Closed this issue · 2 comments

If a script was started for using Attach (meaning, the debugger; statement was added by user) but then Upload and Debug Script is used instead of Attach, the source mapping won't work (because the source mapping expects the internal debugger; statement when Upload and Debug Script was used).

Workaroud: always finish scripts using Conitnue (F5) (also see Wiki)

Probably a similar problem might exist in some cases when Attach is used for scripts that was started by Upload and Debug Script.

Launch script after running a script for using attach should work now (with this e86f1e2 and db4eef7).

However, the warning must be improved when multiple scripts are running on server. And actually it should be easier to finish the running scripts.

Additional, it is still a problem, when a script was started with Upload and Debug Script and then the user tries to use Attach with this script. Because the Upload and Debug Script command added the internal debugger; statement to the server source.

Attaching to a script that was started by Upload and Debug Script is also fixed now.

When multiple scripts with same name are running, the user will still only get a warning in log file for now. Because

  • in Upload and Debug Script the debugger attaches to the last uploaded script, and this is the correct one
  • in Attach the user will get the select Dialog, so they will see, that there are multiple scripts with same name

Because also Issue 191 is fixed, a command for finishing all scripts is not so important anymore.