I get a blank page in preview but no errors in output
Closed this issue ยท 7 comments
The autocomplete and intellisense features appear to be working correctly from what I can tell, its just preview that is not.
I have debug turned on.
This is what I see in the output and the preview pane is totally blank
[client] Build start.
[client] Build complete {
"config": {
"sphinx": {
"buildDir": "/root/.vscode-server/data/User/workspaceStorage/794d241dc27b8d9dd38de61b1321cfc6/swyddfa.esbonio/sphinx/html",
"confDir": "/workspaces/my_proj/docs",
"doctreeDir": "/root/.vscode-server/data/User/workspaceStorage/794d241dc27b8d9dd38de61b1321cfc6/swyddfa.esbonio/sphinx/doctrees",
"srcDir": "/workspaces/my_proj/docs",
"command": [
"sphinx-build",
"-M",
"html",
"/workspaces/my_proj/docs",
"/root/.vscode-server/data/User/workspaceStorage/794d241dc27b8d9dd38de61b1321cfc6/swyddfa.esbonio/sphinx/html",
"-d",
"/root/.vscode-server/data/User/workspaceStorage/794d241dc27b8d9dd38de61b1321cfc6/swyddfa.esbonio/sphinx/doctrees"
],
"version": "7.2.6"
},
"server": {
"logLevel": "debug"
}
},
"error": false,
"warnings": 0
}
[client] Previewing /Tutorials/testing.html
[client] Ignoring output:extension-output-swyddfa.esbonio-%231-Esbonio
I just saw your other comments...
With the version of esbonio
you are using the port number is chosen dynamically and there's unfortunately, no option to configure it.
I do not have much experience with dev containers... (I've never managed to get them to work ๐
), but it should be possible to configure VSCode to forward the port that should be written somewhere in the debug logs ([client] Result is {"port": 1234}
)
Another option is to try the pre-release version of the extension (v0.92.1
). Full disclosure, the version of esbonio
it uses is currently missing a lot of features compared with the mainline version, however, it does have a much improved preview engine, which includes the ability to force esbonio
to use known port numbers.
In which case you will need to set both esbonio.preview.wsPort
and esbonio.preview.httpPort
options
@alcarney hey just saw this! Yeah I confirmed setting the port manually works!
Just curious you know what settings pre-release is missing broadly speaking?
Im also wondering why vscode's "remote.autoForwardPorts" isn't working here. Maybe because the ports aren't opened when the process is started initially?
Ah ok the following actually works at the expense of potentially breaking stuff.
"remote.autoForwardPorts": true,
"remote.autoForwardPortsSource": "process"
I did have vscode pop a message about how a large amount of ports had been opened:
But with this setting when I open the preview pane it spins up that port and I see vscode catch it.
Just curious you know what settings pre-release is missing broadly speaking?
Settings wise... I can't think of anything that's missing - but a lot has changed. For example, there's no longer the esbonio.sphinx.{build,conf,src,doctree}Dir
etc settings to control Sphinx. There's just a single esbonio.sphinx.buildCommand
setting where you give it your sphinx-build
command.
There was also a few options around how esbonio
gets updated, but since esbonio
is now bundled with the pre-release version of the extension, they're no longer relevant and have been removed.
Side note: The docs you linked to in the other thread, despite saying it was the release
version, it's in fact the pre-release version of the docs! ๐คฆโโ๏ธ If you want the documentation for the stable version you can find it here
Im also wondering why vscode's "remote.autoForwardPorts" isn't working here...
I wonder if there's an API the extension can implement to help with this.... ๐ค
Glad to hear that it sounds like you got it working though!
Gonna close because I got it working for now.
I had the same issue, got it working with Esbonio pre-release version and specifying esbonio.preview.httpPort
in the settings.
EDIT: Now I get
[Error - 15:05:55] Request workspace/executeCommand failed.
Message: OSError: [Errno 98] Address already in use
Code: -32603
...