Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebugConfigurationProvider: provide snippets for launch.json #34668

Closed
atian25 opened this issue Sep 20, 2017 · 8 comments
Closed

DebugConfigurationProvider: provide snippets for launch.json #34668

atian25 opened this issue Sep 20, 2017 · 8 comments
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *dev-question VS Code Extension Development Question
Milestone

Comments

@atian25
Copy link

atian25 commented Sep 20, 2017

  • VSCode Version: 1.16.1
  • OS Version: mac

Steps to Reproduce:

#12735 (comment)

@weinand I'm writing a extension to provide debug configurations.

as mentioned at docs "initialConfigurations": "extension.eggjs.provideInitialConfigurations"

my question is how to link a command to configurationSnippets?

had try "configurationSnippets": ["${command.extension.eggjs.provideConfigurationSnippets}"] and "configurationSnippets": ["extension.eggjs.provideConfigurationSnippets"] without luck.

the command is not trigger.

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Sep 20, 2017
@isidorn
Copy link
Contributor

isidorn commented Sep 20, 2017

We are moving away from this model. So currently it is not possible to add snippets using a command, and we will not add that.
The new way of doing things is using a ConfigurationProvider. More about this can be found here

Your feature request could be solved by extending the ConfigurationProvider to also provide snippets, thus renaming the issue

@isidorn isidorn added feature-request Request for new features or functionality and removed new release labels Sep 20, 2017
@isidorn isidorn added this to the Backlog milestone Sep 20, 2017
@isidorn isidorn removed their assignment Sep 20, 2017
@isidorn isidorn changed the title feature request(debugger): allow provideConfigurationSnippets at launch-config DebugConfigurationProvider: provide snippets for launch.json Sep 20, 2017
@weinand
Copy link
Contributor

weinand commented Sep 20, 2017

Since the new introduce DebugConfigurationProvider addresses this need, we can close this request.

@weinand
Copy link
Contributor

weinand commented Oct 27, 2017

Reopening since the DebugConfigurationProvider does not (yet) support to provide snippets.
So you will have to continue to contribute snippets statically in the package.json.

@weinand weinand reopened this Oct 27, 2017
@atian25
Copy link
Author

atian25 commented Oct 30, 2017

@weinand additional 2 request:

  1. DebugConfigurationProvider should support compounds
  2. allow hidden or sort order at debug configuration drop list.

image

We only want to show user: Egg Debug and Egg Debug with brk(which is compounds)

so feature request is either provide a hidden property for "Egg Master", "Egg Agent", "Egg Worker", or compounds should show at top.

{
  // Use IntelliSense to learn about possible Node.js debug attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Egg Debug",
      "runtimeExecutable": "npm",
      "runtimeArgs": [ "run", "debug" ],
      "console": "integratedTerminal",
      "restart": true,
      "protocol": "auto",
      "port": 9999
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Egg Master",
      "runtimeExecutable": "npm",
      "runtimeArgs": [ "run", "debug", "--", "--inspect-brk" ],
      "console": "integratedTerminal",
      "restart": true,
      "protocol": "inspector",
      "port": 9229
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Egg Agent",
      "restart": true,
      "protocol": "inspector",
      "port": 5800
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Egg Worker",
      "restart": true,
      "protocol": "inspector",
      "port": 9999
    }
  ],
  "compounds": [
    {
      "name": "Egg Debug with brk",
      "configurations": [ "Egg Master", "Egg Agent", "Egg Worker" ]
    }
  ]
}

@weinand
Copy link
Contributor

weinand commented Oct 30, 2017

@atian25 please don't add new feature requests onto existing but unrelated issues. They will be ignored. Create new issues.

@vscodebot
Copy link

vscodebot bot commented Nov 17, 2017

This issue has been closed because the feature it requests is not within the scope of the product. See also our issue reporting guidelines.

Happy Coding!

@isidorn
Copy link
Contributor

isidorn commented Dec 20, 2017

I believe this can be done using the CompletionItemProvider API.
Simply register a CompletionItemProvider only for launch.json file using this API. And your CompletionItemProvider can return CompletionItems which inserts a SnippetString as an insertText.

@isidorn isidorn reopened this Dec 20, 2017
@isidorn isidorn added *dev-question VS Code Extension Development Question and removed *out-of-scope Posted issue is not in scope of VS Code labels Dec 20, 2017
@vscodebot
Copy link

vscodebot bot commented Dec 20, 2017

We have a great developer community over on slack where extension authors help each other. This is a great place for you to ask questions and find support.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Dec 20, 2017
@weinand weinand removed the feature-request Request for new features or functionality label Dec 20, 2017
@weinand weinand removed this from the Backlog milestone Dec 20, 2017
@weinand weinand added this to the November Recovery 2017 milestone Dec 20, 2017
@kieferrm kieferrm modified the milestones: November Recovery 2017, December 2017/January 2018 Dec 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *dev-question VS Code Extension Development Question
Projects
None yet
Development

No branches or pull requests

4 participants