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

vscode:// schema for opening files doesn't work, says "Unable to open <file>: resource is not available" #70328

Closed
xpl opened this issue Mar 12, 2019 · 2 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@xpl
Copy link

xpl commented Mar 12, 2019

Hi there. I am now developing a nice-looking error displaying UI for browsers that allows for opening the error locations in VS Code by clicking on them. I've read in the docs that it is possible by using vscode://file/full/path/to/file schema:

https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls

However, it is not working on my machine. Please help me with that, as the feature is really cool and critical for being able to communicate with VSCode from a browser for a better webdev debugging experience!


  • VSCode Version: 1.32.1
  • OS Version: MacOS Mojave 10.14

Steps to Reproduce:

  1. In VS Code, open a folder containing a file.js, open that file. Suppose that the file's full path is /Users/xpl/test/file.js

  2. In Terminal.app, run open vscode://file//Users/xpl/test/file.js (or open that URL in a browser)

  3. An error pops up ("unable to open 'file.js': resource is not available"):

Screen Shot 2019-03-12 at 21 03 44

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

@yume-chan
Copy link
Contributor

duplicate of #69998

@xpl
Copy link
Author

xpl commented Mar 12, 2019

@yume-chan Sorry for not noticing it, my bad :(

Also is it possible to open a file by a path relative to the currently opened workspace folder?

Like, for example, vscode://workspace-file/foo/bar.js (would open ${workspaceDir}/foo/bar.js)? It would be really useful because it is not always possible to have a full path to the file, often only a relative path is available.

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 13, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants