Closed EnixCoda closed 2 years ago
Yes, you are right, here's a project with the same idea click-to-component
Additionally, react-dev-inspector
can also config like this behavior for vscode only, without any other config.
<Inspector
disableLaunchEditor={true}
onClickElement={({ codeInfo }: InspectParams) => {
if (!codeInfo?.absolutePath) return
const { absolutePath, lineNumber, columnNumber } = codeInfo
window.open(`vscode://file/${absolutePath}:${lineNumber}:${columnNumber}`)
}}
/>
@EnixCoda thanks for proposal, I have updated the docs.
This project is creative! Perhaps it can get rid of the extension for VS Code users to simplify the workflow.
VSCode sets up the
vscode://
protocol handler that works in browsers. URLs that starts withfile
will be handled asOpen file
command. For example, a link with the URLvscode://file/Users/username/Downloads/test.txt
would open/Users/username/Downloads/test.txt
for you, if it exists on your drive.