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

Incorrect comment in vscode.d.ts related to registerDebugConfigurationProvider #36118

Closed
atian25 opened this issue Oct 12, 2017 · 12 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@atian25
Copy link

atian25 commented Oct 12, 2017

  • VSCode Version: 1.17.1
  • OS Version: mac

Steps to Reproduce:

  1. write a extension
  2. call vscode.workspace.registerDebugConfigurationProvider

image

BTW, https://code.visualstudio.com/docs/extensions/example-debuggers need updated also.

Reproduces without extensions: Yes/No

@vscodebot vscodebot bot added new release extensions Issues concerning extensions labels Oct 12, 2017
@egamma egamma changed the title [extension] registerDebugConfigurationProvider not found Debug API registerDebugConfigurationProvider not found Oct 12, 2017
@egamma egamma added info-needed Issue requires more information from poster debug Debug viewlet, configurations, breakpoints, adapter issues and removed extensions Issues concerning extensions info-needed Issue requires more information from poster labels Oct 12, 2017
@egamma
Copy link
Member

egamma commented Oct 12, 2017

@atian25 In your package.json do you set the engine version to 1.17 and did you run postInstall?

@egamma egamma added the info-needed Issue requires more information from poster label Oct 12, 2017
@atian25
Copy link
Author

atian25 commented Oct 12, 2017

  "engines": {
    "vscode": "^1.17.0"
  },

and just run postinstall:

➜  vscode-eggjs git:(master) npm run postinstall

> eggjs@0.0.6 postinstall /Users/tz/Workspaces/github/vscode-eggjs
> node ./node_modules/vscode/bin/install

Detected VS Code engine version: ^1.17.0
Found minimal version that qualifies engine range: 1.17.0
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/be377c0faf7574a59f84940f593a6849f12e4de7/src/vs/vscode.d.ts
vscode.d.ts successfully installed!

see the image above, in DEBUG CONSOLE, log vscode.version is 1.17.1

@egamma
Copy link
Member

egamma commented Oct 12, 2017

You are using the wrong name space. It is vscode.debug.registerConfigurationProvider.

@egamma egamma closed this as completed Oct 12, 2017
@atian25
Copy link
Author

atian25 commented Oct 12, 2017

oh, sorry.

so it seems to be a doc bug at vscode.d.ts

image

@atian25
Copy link
Author

atian25 commented Oct 12, 2017

@egamma egamma reopened this Oct 13, 2017
@egamma egamma removed info-needed Issue requires more information from poster new release labels Oct 13, 2017
@egamma egamma changed the title Debug API registerDebugConfigurationProvider not found Incorrect comment in vscode.d.ts related to registerDebugConfigurationProvider Oct 13, 2017
@egamma
Copy link
Member

egamma commented Oct 13, 2017

@atian25 this explains things, thanks. Reopening.

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Oct 13, 2017
@weinand weinand added this to the October 2017 milestone Oct 13, 2017
@weinand
Copy link
Contributor

weinand commented Oct 23, 2017

For updating the documentation (https://code.visualstudio.com/docs/extensions/example-debuggers) I've created microsoft/vscode-docs#1216.

@atian25
Copy link
Author

atian25 commented Oct 27, 2017

hi, @weinand

had register, but the provideDebugConfigurations don't trigger when click add Configuration, did I miss some config?
should I need to provide contributes.debugger ? how?

  context.subscriptions.push(vscode.debug.registerDebugConfigurationProvider('node', {
    provideDebugConfigurations(folder: WorkspaceFolder, token?: CancellationToken): DebugConfiguration[] {
      return [
        {
          name: 'Egg Debug',
          type: 'node',
          request: 'launch',
          port: '9999',
        }
      ];
    }
  }));

@weinand
Copy link
Contributor

weinand commented Oct 27, 2017

@atian25 make sure that your debugger extension activates correctly by contributing this in package.json:

	"activationEvents": [
		"onDebug",

                // ... and all commands that need to activate this extension 
        ]

Please note that provideDebugConfigurations is only called for projects that do not have a launch.json. And you need to press debug's gear icon.

@atian25
Copy link
Author

atian25 commented Oct 27, 2017

provideDebugConfigurations don't support add Configuration?

Only had to config configurationSnippets?

@atian25
Copy link
Author

atian25 commented Oct 27, 2017

as #34668 DebugConfigurationProvider should support configurationSnippets now

@weinand
Copy link
Contributor

weinand commented Oct 27, 2017

I was wrong in closing #34668. Please see my comment there.

@mjbvz mjbvz added the verified Verification succeeded label Nov 1, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants