Gatsby Installation
!!! Note
CodeSee is compatible with Gatsby 2.25.x+ or Gatsby 3.x.+
Install the CodeSee package in your JavaScript or TypeScript app
In the terminal, run the install command for your package manager:
=== "npm"
```shell
npm install --save-dev @codesee/tracker@latest @codesee/babel-plugin-instrument@latest
```
=== "yarn"
```shell
yarn add --dev @codesee/tracker@latest @codesee/babel-plugin-instrument@latest
```
Configure your project
- Follow the instructions for adding a
.babelrc
to your Gatsby build, if you have not already done so. - Add the
codesee
plugin for development. Add the following to theenv
->development
part of your config (env
goes at the top level):
"env": {
"development": {
"plugins": [
["@codesee/instrument", { "hosted": true }],
/* ... other dev plugins ... */
]
},
}
Optional: configuration for large or high data applications
verbose: boolean
By default, CodeSee instruments your code in order to record the data value of every expression. This always results in the application running slower while recording, and in rare circumstances, it can cause a noticeable slow down even when not recording. If this slowdown is happening in your application, you can configure CodeSee to use verbose: false
(or terse) mode. CodeSee will instrument your code less and capture less data (just the inputs and outputs of functions), but continue to provide the same tracing, side effects, and visualizations as always.
- Verbose mode (default): gets all of the runtime data but in some applications or recordings can cause a noticeable slowdown.
- Terse mode: captures less runtime data, but your recordings will be more performant. If you have a high data application, or are noticing slowdown, we recommend you try setting
verbose: false
.
"plugins": [
["@codesee/instrument", { "hosted": true, "verbose": false }],
/* ... other dev plugins ... */
]
!!! note
This setting affects all developers working on the application. It requires a clean build.
Rebuild and run your app locally
Rebuild your app, wait a few seconds, and you should see the CodeSee button towards the top right of your screen. Congrats, you're ready to start using CodeSee!
Updated over 1 year ago