Closed Mr-Possum closed 10 months ago
@Mr-Possum Can you repro this issue with our sample project? https://github.com/kirksl/karate-maven-gradle
Just cloned it and it (Tried Karate Runner 1.2.4) appears to be working for a Jar (Tried Karate 1.0.0 and 1.3.1), Maven and Gradle (Tried Karate 1.0.1)
Jar
Maven
Gradle
tried running order.feature withpom.xml in the project using this launch json below. The tests didn't stop at the break point:
{
"version": "0.2.0",
"configurations": [
{
"type": "karate",
"name": "Karate (debug): Standalone",
"request": "launch",
"feature": "${command:karateRunner.getDebugFile}",
"karateOptions": "",
"karateCli": "mvn test '-DtestBuildDirectory=target/test-classes' exec:java '-Dexec.mainClass=com.intuit.karate.cli.Main' '-Dexec.args=-d' '-Dkarate.env=debug' '-Dexec.classpathScope=test' '-Drevision=0.0.0' '-DTEST_DEBUG=true' -X"
}
]
}
debug using jar file works fine with 1.3.1 and 1.4.0
I think I see the problem
See in your launch.json the line "name": "Karate (debug): Standalone",
That's the configuration for the karate jar file only
There are two more debug configurations you can add if you click on the Add Configuration...
button in the editor
Here's all 3 after they are added
After adding the one for Maven
in your case then just select it here
maven config didn't work for me, even after a rename. Btw debug with jar file doesn't set vars defined in karate config js. Actually it looks like karate config js is not being executed at all (you can see in in your screenshots as well - there are no vars shown in scope) But I guess it's a different issue.
Could you create a PR with all of your changes to the karate-maven-gradle
project and let me know the steps to reproduce this. I'd like to try and reproduce this on my machine. Also if you can let me know what operating system and version you're on.
@Mr-Possum closing as there's been no activity on this for awhile. Please open a new ticket if you need anything at all.
Debug server never starts with any karate runner version past v1.2.1. Please let me know what details are needed to reproduce, and I'll add them here