luna-testing icon indicating copy to clipboard operation
luna-testing copied to clipboard

Set a breakpoint in a browser test?

Open Nathan22Miles opened this issue 6 years ago • 1 comments

I love how easy it is to use this!

Is there a way to set a break point? I presume this would mean some way to open the developers tools display for the headless browser that is running the test?

Thanks, Nathan

Nathan22Miles avatar Jul 12 '19 21:07 Nathan22Miles

Thanks. At the moment that is not possible, but I could see that being useful.

I sometimes end up doing similar things by commenting out code in Luna to keep the server from closing after a test run so I can open a specific test run in an actual browser for debugging purposes. Perhaps that is a feature I should support out of the box using a command line flag.

I am not sure how breakpoints would work in that context though or if puppeteer has API support for them. Perhaps you could put breakpoints in your code and then run luna using a flag like --open-in-browser. I am not entirely sure the best way to handle it.

ccampbell avatar Jul 15 '19 14:07 ccampbell