mbolotov / intellij-cypress

IntelliJ-Cypress plugin: https://plugins.jetbrains.com/plugin/13819-intellij-cypress Pro version: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro
MIT License
35 stars 5 forks source link

Debugger not stopping at breakpoints #102

Closed bensullivan-ag closed 1 year ago

bensullivan-ag commented 1 year ago

Hi

I am trying to debug my cypress code with the debugger in the pro version of the plugin. I've tried latest versions of IDEA Ultimate and WebStorm and neither seems to work. See attached screencast..

Are there any magic sprinkles you can offer?

Thanks

Ben

mbolotov commented 1 year ago

Hi @bensullivan-ag first of all, to be on the safe side, are you sure that the execution goes through the line with your breakpoint? could it be that the test fails, for example, on a beforeEach hook? Also, can you check if the Scripts tab shows the source maps for your test? image

bensullivan-ag commented 1 year ago

Hi @mbolotov

Even if I put a breakpoint on a line that initialises the script the debugger does not stop. I have folders in the Scripts tab but they appear to be empty.

mbolotov commented 1 year ago

Could you try any Cypress public project to check whether the issue is related to your project setup or your environment? For example, you can try this one: https://github.com/cypress-io/cypress-example-kitchensink

bensullivan-ag commented 1 year ago

sure thing - good idea; here is my IDE version:

Screen Shot 2022-08-16 at 19 15 31
bensullivan-ag commented 1 year ago

ok - so I can't run kitchen sink with plugin either (works from cli). Here's a screencast:

https://www.dropbox.com/s/x78673fsk0icuvd/Kapture%202022-08-16%20at%2019.47.09.gif?dl=0

I'm running a new UI plugin from IntelliJ on latest version of macos on a M1.

Any ideas?

bensullivan-ag commented 1 year ago

OK - so if I create a cypress run config and set a breakpoint, I can step through the kitchen sink. So I wonder what is different about my project config that is causing breakpoints not to pause execution...

mbolotov commented 1 year ago

That's probably related to issues with source map configuration. Do you use Webpack or any other build tool in your project?

mbolotov commented 1 year ago

is that possible to share your project with me?

bensullivan-ag commented 1 year ago

is that possible to share your project with me?

Afraid not.

It's a gargantuan monorepo.

Any suggestions I could check for on this end?

mbolotov commented 1 year ago

not many without details of your project setup.

you can try devtools to see if their debugger works okay or not with your project. if it does not stop on breakpoints either, that means there is nothing I can do on the plugin side.

bensullivan-ag commented 1 year ago

OK - that's a shame..

mbolotov commented 1 year ago

@bensullivan-ag I think this issue may be closed as there doesn't seem to be anything wrong with the plugin itself. what do you think?

mbolotov commented 1 year ago

closing this issue as not reproducible and seems not related to the plugin at all.