Is there any configuration to disable the debug button. It is making VS code behave strangely. First it adds a new line making it awkward to visualise my code. I have also experienced scrolling while I'm typing with the new debug functionality.
It doesn't look like there was an option added with the pull request but it'd be quick to add for anyone interested.
I'm also having this problem - after every new line I have to scroll up
FWIW I would much rather have the lens say "Expected value to be (using ===): true, Received: false" than "Debug." Is there an existing feature request for this?
I am having weird scrolling behavior as well on Code-Insiders.
This is starting to get in my way while coding - for example when I have the following files:
component.js:
import React, { Component } from 'react'
class Component extends Component {
render () {
return <div>
</div>
}
}
export default Component
````
And the following component.test.js:
```javascript
import React from 'react'
import {shallow} from 'enzyme'
import Component from './'
describe('Component', () => {
it('shadow renders', () => { shallow(<Component />) })
it('renders at least one image', () => {
const wrapper = shallow(<Component />)
expect(wrapper.find('img').length).toBeGreaterThan(0)
})
})
While trying to write between the components' <div> to write the render content, the "debug" indicator flips around after every keystroke and I can't write anything.
I've currently resorted to running Jest watch mode in the integrated terminal, but it isn't ideal. This plugin was working amazingly well until this feature dropped.
VSCode version: 1.18.1
OS: Windows 10 Fall Creators Update (Build 1709)
Seems to me like it is more a bug than an enhancement: VSCode can quickly become fairly unusable.
Note that on top of having the feature to disable it, you might still want to fix the actual debug button, because right now it appears in random places (comments, etc.) even outside jest-related code.
It's pretty easy to add this as a feature 馃憤
I'm at the end of a deadline, so I have no time, but I can review and merge stuff
Any updates on this ? Currently this plugin makes vscode unusable, at least for me.
@smith, no we don't have an existing feature request for changing the "Debug" text to be the error message.
Can we help you get started on a PR @bogdan-calapod?
Actually I'd be interested - I might have a couple hours free in the weekend to look into it, but I haven't worked on vscode extensions until now.
Apart from the official documentation is there any other resource I should be aware of to get started ?
Awesome. I've found those docs a good start to understand what the extension lifecycle. There are also docs for the vscode API that help.
If you follow the Contributing notes to clone the repo, open it in Code, and start debugging with the "Launch Extension" debug config you're halfway there. Since it would take most of your time getting familiar with the code, here's the gist:
"contributes" section of package.json and IPluginSettingsprovideCodeLenses(...) is called -- follow those decorationsSounds great - I'll be getting to work and will get back when I have something
For future time travellers the setting you're looking for is "jest.enableCodeLens": false
Oh no, @Huddo121! Any other feedback/features to make the CodeLens useful? I've got the PR in to fix which documents it displays on.
@seanpoulter
I would of been happy with a delay setting, so that all the problems that I was seeing with the code lens (code scrolling and code jumping around being the biggest for me) could be mitigated. So "jest.codeLensDelay": 2500 would prevent the lens from displaying unless I had stopped typing for 2.5 seconds.
The lens also sometimes appears in weird places

I've also got one sitting here between two import statements, at the top of a file.
When I click on the debug lens, a message pops up saying "Cannot find jest.js file!". I don't know what that file is, a quick search hasn't turned up anything, and I haven't needed it before now, so perhaps linking to some documentation about whatever that file is in the message would be beneficial.
Those are some great ideas @Huddo121. Thanks for the feedback.
I would of been happy with a delay setting, so that all the problems that I was seeing with the code lens (code scrolling and code jumping around being the biggest for me) could be mitigated.
How about waiting until there are test results in to add the CodeLens?
The lens also sometimes appears in weird places
Yep, it wasn't This should be fixed by a recent PR. Let me know if it's acting up.
When I click on the debug lens, a message pops up saying "Cannot find jest.js file!".
Any chance that's a repo we can troubleshoot? If you're using a non-standard test script command, clicking on Debug will make that error message appear. It's similar to #193.
Who from 2020.
Are those instructions to disable the Code Lens everywhere @specialistvlad?
Are those instructions to disable the Code Lens everywhere @specialistvlad?
Definitely enough for me 馃槉
Most helpful comment
For future time travellers the setting you're looking for is
"jest.enableCodeLens": false