TUM-DAML / seml

SEML: Slurm Experiment Management Library
Other
165 stars 29 forks source link

VSCode clickable URL to attach debugger #133

Closed Grutschus closed 5 months ago

Grutschus commented 6 months ago

Added a log message containing a clickable URL to automatically attach a debugger in VSCode. No need to create a launch config every time.

Reference issue

No issue.

What does this implement/fix?

If running seml [collection] start --debug-server, previously, the IP and port have just been printed to the console. To attach the debugger in VSCode one had to create a launch configuration every time.

Using the VSCode extension Debug Launcher one can create clickable URLs for launch configs. This PR adds a generator for such a URL and prints it to the console.

debug_url_seml

Additional information

I had to hack the logger in order to prevent line breaks due to the limited console width. This is very unpretty. If there is a better way, let me know.

n-gao commented 6 months ago

@Grutschus The debug launcher has been scrapped from vscode marketplace? at least the link is dead (same for google link)?

Grutschus commented 6 months ago

It seems that the extension has been scrapped yesterday(!) 🙄 Closing this PR.

image
n-gao commented 5 months ago

@Grutschus it looks like the extension is back online. Though the project is still archived. Not sure whether we want to rely on archived code? But I also don't see a big issue where. What do you think?

Grutschus commented 5 months ago

@n-gao I think the worst that can happen here is a dead URL in the console that we can remove, should the extension become truly outdated. Let me integrate your latest feedback  👍

Grutschus commented 5 months ago

The console output now looks something like this:

image
n-gao commented 5 months ago

Thanks a lot! :) Just tested it, and it works great! But could you please rebase to the current master and do the following changes: