Skip to content

Make stepping with debugger possible - resolve steps immediately #1144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xt1 opened this issue Jul 2, 2018 · 4 comments
Open

Make stepping with debugger possible - resolve steps immediately #1144

xt1 opened this issue Jul 2, 2018 · 4 comments

Comments

@xt1
Copy link
Contributor

xt1 commented Jul 2, 2018

What are you trying to achieve?

Stepping using debugger while watching test execution in browser.

What do you get instead?

I get a bunch of promises that evaluate immediately, meaning the browser does nothing until I hit pause() or the test completes, then the commands start to execute.

/// <reference path="../steps.d.ts" />

Feature('Checking debug');

Scenario('test something', (I) => {
  I.amOnPage("/");
  I.see("CRM Online");
  pause(); // or a breakpoint
  I.see("Log in with your registered account");
  I.click("Next");
  // step to here, and browser is still not doing anything.
});

Details

  • CodeceptJS version: 1.3.0
  • NodeJS Version: 8.11.3
  • Operating System: win10 64bit
@DavertMik
Copy link
Contributor

That's why we have pause() 🤗

If you want TRUE step-by-step execution just put it into async function and add await for each operator.
But basically you don't need to do the heavy debugging unless you are fixing something in CodeceptJS core... For everything else you have pause()

@xt1
Copy link
Contributor Author

xt1 commented Jul 7, 2018

Some people just want to single step.
I'll see if the await-everything solution satisfies them.

@DavertMik
Copy link
Contributor

I'm planning to improve pause() to provide step-by-step debugging experience.
But not sure when

@mrcjbf0001
Copy link

I am looking for some help doing the same thing in vs code, stepping through my codeceptjs async scenario one line at a time without adding await before each line. The same thing is happening to me as the first comment, when I step over a console log, it prints to the console. But any other step does not execute until the end of the scenario unless I add the await command before it. I see the last entry here is from 2018, has anything changed to make this possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants