vscode-jest icon indicating copy to clipboard operation
vscode-jest copied to clipboard

Cannot debug tests in code-server

Open yasinuslu opened this issue 5 years ago • 1 comments

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.

Kapture 2019-04-14 at 4 29 08

Environment

  1. node -v: v10.14.1

  2. npm -v: 6.4.1

  3. npm ls jest or npm ls react-scripts (if you haven’t ejected): [email protected]

  4. your vscode-jest settings if customized:

    • jest.pathToJest? not customized
    • jest.pathToConfig? not customized
    • anything else that you think might be relevant?
  5. 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 or node_modules/.bin/jest) yarn test or npm 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...

yasinuslu avatar Apr 14 '19 01:04 yasinuslu

Any movement on this? I'm having trouble running tests in a docker container too.

rhydianleejenkins avatar Dec 16 '21 23:12 rhydianleejenkins