niivue / niivue-vscode

NiiVue extension for vscode + standalone web app
https://niivue.github.io/niivue-vscode/
MIT License
24 stars 7 forks source link

Create hmtl page for debugging main.js #7

Closed korbinian90 closed 1 year ago

korbinian90 commented 1 year ago

Currently debugging the webview layout is quite challenging in the vscode rendering. It doesn't give access to console or debug view.

Making the same html with the main.js file run in plain html (with mockup data or drag'n drop) would make it easier to debug/develop

korbinian90 commented 1 year ago

This works now with https://github.com/niivue/niivue-vscode/commit/ae781261fc4efb08653d186b46b77e9a14379c3a

TODO: test if moving the file picker from vscode to main.js works on remote

korbinian90 commented 1 year ago

The main.js filepicker always runs locally in the webview. I think on remote we want a file picker that picks remote files. I cannot think of a reason when we want to pick local files. It is probably best to use the vscode filepicker as default (with a bit more overhead for sending messages between main.js and vscode). The main.js file can then distinguish between opened in vscode or web. When it is opened in web, it uses its own filepicker.