Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Debugging Cypress tests in Visual Studio Code

$
0
0

I want to use VS Code to edit and debug Cypress tests. It seems like this should be simple; the cypress docs mention VS Code directly (but give no clues about how to configure VS Code's launch.json file for debugging either there or on the debugging page). I have a launch.json configuration that starts cypress/electron, but VS Code gives this error:

Cannot connect to runtime process… connect ECONNREFUSED 127.0.0.1:5858

Then shuts it down.

Looking at the sample electron for VS Code project doesn't help (adding protocol or program attributes didn't work).

Here is my configuration:

{
    "name": "Start integration_tests",
    "type": "node",
    "request": "launch",
    "stopOnEntry": false,
    "cwd": "${workspaceRoot}",
    "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/cypress",
    "runtimeArgs": [
        "open"
    ],
    "console" : "internalConsole",
    "port": 5858,
}

Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>