devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Open in cursor opens two editor tabs corresponding to line and column

Open Thooto opened this issue 10 months ago • 4 comments

Hello,

I am using the vite plugin for the devtools and have properly setup launchEditor: "cursor" and added cursor to my path on macos.

When I click a component from the devtools to open it into cursor, it always opens two editors for the line and column of the corresponding html tag:

Image

Apparently cursor requires the --goto option with :line:column appended to the file name to properly go to a line/column: cursor --goto /.../SomeVueFile.vue:22:1

If anyone else has an issue with this, here is a workaround:

  1. Create a cursorgoto.sh file in your project root with this content:
#!/bin/bash
cursor --goto "$1:$2:$3"
  1. Make it executable chmod +x cursorgoto.sh

  2. Replace it in your vite config:

export default defineConfig({
    plugins: [
        vueDevtools({ launchEditor: './cursorgoto.sh' }),
    ]
});

Thank you!

Thooto avatar Apr 10 '25 07:04 Thooto

Hope the authorities can solve this problem! Let developers not need additional configuration!

glm9412 avatar Apr 30 '25 07:04 glm9412

How do this In Windows,Please

shilianmalaxiangguo avatar Jul 03 '25 02:07 shilianmalaxiangguo

Same problem with Windsurf

LudovicLaloux avatar Oct 08 '25 13:10 LudovicLaloux