Closed deepziem closed 4 years ago
Hi @deepziem
You are right, the plugin does not support cucumber files. So one neither can set breakpoints nor even create a run configuration using a scenario gutter.
As for the questions 5,6,7 - are you asking about a cucumber case or a general (mocha) one?
I tried breakpoints on a sample cypress-cucumber project.
And I was able to setup a breakpoint on a JavaScript-code line and got debugger stopped on that breakpoint:
@mbolotov i am not generally able to set up debugger. I did not mean to debug cucumber lines but the cypress javascript only. Based on my settings shown in screenshot what am i doing wrong, when i run why is it not running?
I changed my package.json and cypress.json to match the example you gave me. Thing Is the actual setup is confusing , can you provide clear instructions somewhere
First:
When we trigger tests, should we trigger the script
"Debug_Tests" : "cypress run --spec \"**/*.feature\" --headed --browser chrome"
OR
Should we trigger a feature file? and how did you do that?
Second:
Can you provide some screenshots of the settings you are using for this ?
The plugin does not use npm scripts at all. For starting a single feature file, I used the following run configuration:
Thanks .. I tried same .. but somehow something is wrong .. it does not bring up the debug window just the run window as below .. any idea why?
I am able to trigger the tests, that is not the issue.
Ie the run window will not stop at breakpoints. When i try to edit specifically the debug configuration [ not edit via the top menu bar .. try to edit from debug window], it still asks for the runner.
try to edit from debug window
I'm not sure I understand what do you mean. Could you show where do you do edit from debug window?
BTW, did you try to debug the sample project I mentioned? I think it will be good to know whether the problem lies in your specific project or not.
I tried sample project and latest intellij , latest nodejs .. same issue . Breakpoint does not stop. This below window is by clicking the debug button.
This is when it runs ..
is it possible to record the video of how you run the debug?
also, you could try to add a debugger
statement into the code instead of a breakpoint to check if it's the breakpoint hit problem only
Ive added a recording .. same effect with .debug() or .debugger statement literally.
Okay, I got it: The debugger session indeed can't be established in your case. You can try to disable automatic browser page selection here: In this case, debugger will ask for the page to connect if there are many: There are a few problems with this approach:
So you can try this and see if it will work this way. It could be the single page with the name other than 'about:blank' and it then should work with the checkbox deselected. If you find several pages and the correct page name is not 'about:blank' but has a static name, you can define it in the run settings.
Wow That's nice .. I am able to debug now .
But I promise you , It's kinda crazy. Sometimes using external mouse / Keyboard i Mac [ I use RAT Gaming mouse /Mech keyboard] its not easy to click. It doent respond or work like mac keyboards and other things when this popup comes by. Sometimes I am able to click and sometimes not
I was thinking of recommending to capital one for my team .. Can you also kindly put in instructions for cucumber and also cypress similar way in readme.md and also
Can you suggest a way to debug as a script like this pls ? I am sure there is a way .. by intercepting chrome in a debugger session .. "test": "cypress run --spec \"*/.feature\" --headed",
Ie make it generic pls. What we do is a custom script .. which will read a set of tags in sequential order .. Then we take the tags and pass to the above script as a parameter .. and Loop through all tags. This way we can achieve parellel and sequential combination according to various applications ..
It's nice to see you've eventually got it to work. How does the page url look like? Is it static?
As for debugging scripts, I will look into your request. I think it's doable.
Buddy .. not sure how to answer you .. I really donno .. I barely managed to make it work.
Even now as I mentioned .. The window pops up once or twice [Debug wont work ] .. then it goes away .. then it debugs when we debug second or third run .. it does for 2 3 runs and the popup comes again [now debug wont work again] .. then next set of runs, it works again etc.
I tried to clear cache of IntelliJ and. restart .. popup comes .. and then the above cycle repeats for sure
yep, that's strange. could you please make a screenshot of the popup next time it appears?
hmm oklemme try
Hi, It's just as previous screenshots. Just that it will pop up now and then .. tried a few different macs. So kindly see if you can make this smooth. Cypress debugging is making my life hell.
Also npm script debugging pls.
Hi @kumzme So what options does popup offer? Are they the same each time?
It's just as previous screenshots
Unfortunately, I don't see any popup on your screenshots here. Could you please attach one more?
Hi See below. Unfortunately, It works at best flaky .. Really waiting for a fix / update for npm script run.
So what options does popup offer? Are they the same each time?
It is always almost same. One option in name of project and one generic
Hi guys! I believe I've fixed the connection problem in version 1.6.1, please try it. Please also note that 1.6 version brings support for running Cucumber tests from IDE.
closing as fixed