Open xiki808 opened 7 months ago
Thanks for your report.
With the latest version.
You can pass specifiedEditor
option to launch editor for vscode devcontainers:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import TurboConsole from 'unplugin-turbo-console/vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
TurboConsole({
specifiedEditor: 'code'
})
],
})
I tested with the new version, the launch link now takes me to a new tab, which displays this:
I haven't seen any difference when running with specifiedEditor: 'code'
On checking the /inspect I see this:
For my docker setup, I do have a port forward for 3070
Please follow these steps on your devcontainers to troubleshooting:
node test.js
, and check jump editor whether normal.pnpm dev
, click the output on the console panel and and check jump editor whether normal.At the same time, please pay attention to whether the terminal prints out some errors.
Hi @yuyinws, thanks will test it out today. I'm guessing I should run the tests on the container right?
I missed to mention I'm using WSL2 too
Yes, run the tests on the container.
Within the container I cloned launch editor, ran npm install
and on node test.js
it opens the packages/launch-editor/index.js
file successfully in the current window.
Within the container I cloned vite turbo console, ran pnpm install
and then pnpm dev
. I get the following output:
Clicking on the local link it redirects to the browser but with URL: http://0.0.0.0:10104/. That port is the correct port that is mapped to 5173 within the container. The browser doesn't know about 0.0.0.0, but only localhost. http://localhost:10104/ would work
Clicking on Turbo console, it opens this url: http://localhost:3070/inspect and I get the empty inspect as I demonstrated above.
I tried mapping port 3070:3070 from host to container, but when I run vite turbo console and clicking on the turbo console link, I'm redirected to http://0.0.0.0:3070/inspect, which since of 0.0.0.0 the browser does not know about.
If I change the url to http://localhost:3070/inspect, I still get an empty inspect
I simulate your development environment and it works normal. I think this may be due to port mapping.
(check below gif)
I think the issue could be that my vite port mapping is a different fixed port, for example in my case: 10107:5173
Would be nice to have a config to specify that port 🙏
Gave it a test so vite port mapping was the same 5173:5173 as you can see below
Unfortunately only partial success, inspect page shows me the file, but on the launcher link click, it only opens the "everything is normal" new tab, rather than redirecting to the editor
Clear and concise description of the problem
In my local environment I'm using vscode devcontainers, hence I'm loading my code from within a docker container. The jump to editor link is not working with this setup, any chance to add this feature?
Suggested solution
Jump to editor within a devcontainer setup
Alternative
No response
Additional context
No response
Validations