vscode-jest
vscode-jest copied to clipboard
Cannot debug tests in code-server
Description
First of all Thank you for this awesome extension. It makes writing tests more fun and less painful.
This problem is caused in a docker container running code-server
I'm reporting this issue to see if anyone have any workarounds for this. I would totally understand if you don't want to fix it since it's not happening in your target environment.
When I try to debug my tests there is nothing running in the terminal and debug session doesn't start.
Environment
-
node -v
: v10.14.1 -
npm -v
: 6.4.1 -
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): [email protected] -
your vscode-jest settings if customized:
- jest.pathToJest? not customized
- jest.pathToConfig? not customized
- anything else that you think might be relevant?
-
Operating system: Ubuntu 18.10 in docker
Prerequisite
- are you able to run jest test from command line? yes
- how do you run your tests from command line? (for example:
npm run test
ornode_modules/.bin/jest
)yarn test
ornpm run test
Steps to Reproduce
- Clone this repository
- Run
docker build -t my-code-server .
in the repository directory - Run
docker run -p 127.0.0.1:8443:8443 -v "${PWD}:/project" my-code-server code-server --allow-http --no-auth
in a project with jest tests - Open http://localhost:8443
- Open a file with failed jest tests
- Click
Debug
button
Relevant Debug Info
It's not running in VS Code. It's running in code-server instead.
Expected Behavior
A new integrated terminal should have been created and debug session should have started.
Actual Behavior
Code tries to start the debug session for a while, then nothing happens.
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...
Any movement on this? I'm having trouble running tests in a docker container too.