Home

Awesome

vite-plugin-console-line

English 中文

A vite plugin,that show your console.log(xx) file location and line number.

Usage

import consoleLine from "vite-plugin-console-line";

const viteConfig = defineConfig({
  // ...
  plugins: [consoleLine({ exclude: ["node_modules"], port: 9528 })],
  // ...
});

Params

When debugging in your code, you can view the file location and line numbers for console.log() statements in the browser's console. Clicking on the link will take you back to the editor and navigate to the location of the current console.log().

consolo.log()

Sometimes you may only need to display the file location and line number for console.log(). In that case, you can omit the port field when passing the parameters. consolo.log()

About Open In Editor

open in editor feature is depends on launch-editor.