Launch Debugger through Godot-VSCode-Plugin for a SceneTree script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bitwes

I have a VSCode extension that runs GUT unit tests (GitHub - bitwes/gut-extension: VSCode extension to run GUT from the editor.). I’m trying to figure out how to use the debugger integration the VSCode plugin provides inside my own plugin.

Can you launch the debugger for a script using the VSCode plugin (instead of a scene or the project)? From the documentation and the LaunchRequestArguments, it does not appear to be able to.

If it does have this ability, would it be possible for another plugin to use the VSCode plugin to launch the debugger for a script? Can we send additional arguments?

Currently the gut-extension is a wrapper around the CLI interface for GUT. It relies on the Godot VSCode Plugin to give it document information so it can determine what to run based on the cursor position. It then constructs a command based on that information and sends it to the terminal.

Here is an example of the command used by the gut-extension to run GUT tests:

"/Applications/Godot.app/Contents/MacOS/Godot" -s res://addons/gut/gut_cmdln.gd  -d   -gselect=test_some_test_file.gd -ginner_class=TestSomeTestClass -gunit_test_name=test_some_unit_test

I would like to be able to launch the debugger with this same information, at least launching the script. I could get the other parameters to GUT another way if necessary.