jw3 / example-daffodil-vscode

A VS Code extension for DFDL with Daffodil
Apache License 2.0
2 stars 3 forks source link

Template for launch.json should contain data property #48

Closed jw3 closed 3 years ago

jw3 commented 3 years ago

Steps to reproduce

  1. Install Daffodil extension v0.0.7
  2. Create an empty workspace
  3. Open "Run and Debug" pane on the leftbar
  4. Click the "create a launch.json file" link image

What happened

The launch.json created from the "Run and Debug" pane does not contain all fields required by the extension.

It shows a validation warning about the generated launch config

image

What I expected to happen

That the launch.json would contain all required fields and be ready to launch. It is confusing to see the validation warning, even though it works if you ignore the warning and run.

Suggestions

Instead of using the unset data property to prompt for the file we allow the property to be either a file path or a flag like prompt-for-file? Or perhaps more idiomatic would be to add another VS Code command that can be set by default that works like ${workspaceFolder}/${command:AskForProgramName}.

This would provide a more explicit default profile and also would would help custom profiles created by users to be more understandable.