-
Notifications
You must be signed in to change notification settings - Fork 8
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
[BUG] Open documentation for selection goes to wrong page #60
Comments
To clarify, the extension searches for what you have highlighted. If you don't have something highlighted, it takes you to the blank search page. Can you, between your step 1 and 2, highlight "GameObject" and then right click and search. Does it work then? If that is the case: If you actually are highlighting a word, and it still doesn't search correctly: |
Hi! Cheers! |
Interesting! Is that also the case if you trigger via Command Palette (⇧⌘P) as well? |
You should be also able to trigger via Command Palette with nothing highlighted, and it will prompt you to enter some text. You should be able to enter "Test" or whatever you want, and search. If that doesn't work, I wonder if this is a bug with passing params like ?q=something into Safari via the open method. I had not tested that since I don't have easy access to a Mac. |
Debugging to do:
|
command palette same issue |
Did you enter "chrome" or "Google Chrome"? If nothing happens at all, probably just not finding the chrome app. One of the issues with searching local documentation is needing to pass in the browser. This was because of issues I ran into that general "open url" commands were parsing out the ~?= Hence why I'm suspecting it might be safari that's doing that automatically. But I could be wrong. |
You might also want to try "/Applications/Google Chrome.app" |
Chrome do open with full path in settings (/Applications/Google Chrome.app) |
Also tried this setting with no luck: |
Interesting, so like Safari, it opens but the parameters are either being parsed or not assigned. I think this is related to the main problems of #21 that file:/// is not designed to take parameters like HTTP is. The whole setting viewer thing was a hack in itself. Tobiah's To-Do:
Other general weird debugging ideas
Overall, it may require a rewrite of how local documentation works to do something like suggested here: https://stackoverflow.com/questions/35557531/parameters-are-removed-when-opening-local-url-in-default-browser Generating an HTML page and loading from that, which redirects to the correct URL with parameters. |
Hi, I've investigated a little more and open will not accept URL params: https://stackoverflow.com/questions/9533720/open-a-web-page-with-url-params-from-the-command-line-locally this works: Cheers! |
I think that further cements I need to do a system where it launches a local html page that has been prewritten to automatically redirect. Then I can remove the need to pick the browser entirely, and remove open as a dependency for the project |
👌let me know when you need me to test it. |
Hello I just started using your extension (great tool btw) v1.2.12 and noticed the same behaviour (appended "/30_search.html"). I'm on OSx Catalina 10.15.7, Unity Editor v2019.4.18f1, VS Code Version: 1.52.1., Safari Version 14.0.1 In my VSCode settings file I have: "unity-tools.localDocumentationPath" : "Applications/Unity/Hub/Editor/2019.4.18f1/Documentation/en/ScriptReference", TO reproduce behaviour I highlight a method in a cs file and cmd+' (shortcut key ... same result with right-click search). Any luck on this? |
Describe the bug
Extension always opens file:///Applications/Unity/Documentation/en/ScriptReference/30_search.html
To Reproduce
Steps to reproduce the behavior:
config
Extension is configured for local documentation : "Applications/Unity/Documentation/en/ScriptReference"
Local documentation viewer = "safari"
Expected behavior
Help for the selected class should open. Eg:
file:///Applications/Unity/Documentation/en/ScriptReference/30_search.html?q=GameObject
VSCode (please complete the following information):
The text was updated successfully, but these errors were encountered: