Frederisk / Wikitext-VSCode-Extension

A Visual Studio Code Extension that provides language support for Wikitext.
MIT License
89 stars 14 forks source link

Bug: preview doesn't work #86

Closed rinrab closed 1 year ago

rinrab commented 1 year ago

bug

Frederisk commented 1 year ago

Wrong location, this is a problem belonging to Wikitext Extension.

Frederisk commented 1 year ago

In addition, I need more information, such as VSCode version, and Extension version.

At the same time, you can try to update/reinstall this Extension, or disable any other Extension as well.

rinrab commented 1 year ago

I'm currently using VS Code version 1.83.1. After updating VS Code to version 1.84.0 and reinstalling the extension, I'm still facing issues with it not working. Interestingly, the extension does work in a sandbox environment.

Frederisk commented 1 year ago

Well, based on your statement and my testing, I'm more inclined to think this is due to a problem with your other environment settings.

I also noticed that nothing happened after pressing the button. If there are no problems with other functions of this extension, it means that some of the following assertions may have failed.

https://github.com/Frederisk/Wikitext-VSCode-Extension/blob/8d4f27705696abe6eedb6da490598e0691ab905b/src/export_command/wikimedia_function/view.ts#L60-L68

I needed to go into debug mode and set breakpoints to find the problem, but unfortunately I couldn't reproduce the issue.

Frederisk commented 1 year ago

Therefore, the advice I can give is limited.

Maybe you can make any edits in the editor to try to activate vscode.window.activeTextEditor, or delete and reset the host in settings. Or uninstall and clean all configurations and quickly reinstall VSCode and this extension.

rinrab commented 1 year ago

I entered the hostname in the settings, and it's working! Please make the setup process easier, and in that code config may be null or undefined.

Frederisk commented 1 year ago

Please make the setup process easier, and in that code config may be null or undefined.

This may sound a little strange, but in the code, I have set up a warning to the user when the host is empty. Maybe you accidentally typed a space or similar character at that time?

Anyway, I will consider doing more additional checks on this in the future.