question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API registerCallHierarchyProvider does not work as expected and flakily

See original GitHub issue
  • VSCode Version: 1.52.1
  • OS Version: MacOs 10.15.6

Steps to Reproduce: I have an extension (repo here:https://github.com/coolcorexix/jsx-viewer-extension) that use vscode.languages.registerCallHierarchyProvider to process the JSX tree in a file. When I call the ‘peekHierarchyCall’ action in a plaintext file it works stably and always jump to the breakpoint of TestHierarchyProvider (path: src/vscode-components/test-hierachy-provider.ts).

But in the context of ts/tsx/js/jsx files, about half of the time it use another unexpected Hierarchy Provider and does not jump to code of the test-hierachy-provider.ts file. I wonder if this is a buggy behaviour or is there any default provider in VsCode app that run on some conditions that I am not aware of.

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
phatNfqAsiacommented, Jan 27, 2021

@jrieken I figured out the reason, if I set the selector for the provider to detect on language: js, it will not be register if I turned off the Javascript Basic Builtin Extension. But it worked with

vscode.languages.registerCallHierarchyProvider({
		scheme: 'file',
		pattern: '**/*.jsx',
	}, new TestHierarchyProvider());

then the peekHierarchyCall is available. so I confirmed this is caused by BuiltIn extension for JS/TS language. But is there anyway I can make my Extension work stably while turning on these built in extensions?

0reactions
coolcorexixcommented, May 21, 2021

@jrieken what can I help to make this fixed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code API | Visual Studio Code Extension API
A code action represents a change that can be performed in code, e.g. to fix a problem or to refactor code. A CodeAction...
Read more >
Flakily Definition & Meaning - Merriam-Webster
The meaning of FLAKILY is in a flaky manner.
Read more >
Include runtime type definitions using VSCode extension
I'm working on a library that lets users run Node processes from inside another application. The library is called "max-api"; functions for ...
Read more >
10 API Problems Solved by RapidAPI Client
An API can have multiple endpoints, and each endpoint needs to be thoroughly tested to ensure it is working as expected. To do...
Read more >
What I Learned by Building My Own VS Code Extension
Visual Studio Code does not share any lineage with the Visual Studio IDE. ... Code (pun intended) is open source and the team...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found