Can't use debugger in tests in 0.1.7

How strange, I can’t use the debugger statement after upgrading from 0.1.5 to 0.1.7.

JSHint - console/tests/acceptance: console/tests/acceptance/user-can-login-test.js should pass js
hint
    ✘ console/tests/acceptance/user-can-login-test.js should pass jshint.
    console/tests/acceptance/user-can-login-test.js: line 22, col 3, Forgotten 'debugger' stateme
nt?
    console/tests/acceptance/user-can-login-test.js: line 22, col 11, Missing semicolon.

    2 errors

Test code:

import Ember from 'ember';
import startApp from '../helpers/start-app';

var application;

var defaultLogin = {
  email: 'support@test.com',
  password: 'testing'
};

module('Acceptance: As a user I can login', {
  setup: function() {
    application = startApp();
  },
  teardown: function() {
    Ember.run(application, 'destroy');
  }
});

test('visiting /user-can-login', function() {
  visit('/login');
  debugger

  andThen(function() {
    equal(currentPath(), 'login');
    fillIn("#login_email", defaultLogin.email);
    fillIn("#login_password", defaultLogin.password);
    click("#login_submit");
    andThen(function() {
      equal(currentPath(), 'dashboard.index');
    });
  });
});

The test that is failing is a JSHint test. It does not prevent your debugger from functioning properly.

It use to pause the state in chrome, but it no longer does that.

Just a thought, maybe you blackboxed the script in the debugger?

@Leeft could you elaborate? What do you mean by blackboxing?

Blackboxing (in Chrome anyway) excludes the script from throwing exceptions that are then trapped by the debugger, and makes the debugger skip that file during step by step tracing. Doesn’t work that well though with ember-cli since it’s all in a single .js in reality.

So this may be an issue with jshint.

So in my .jshintrc file:

"debug": false,

I tried changing it to true but nothing changed.

Maybe ember test server is not picking up my .jshintrc file? It did before…

Ah-hah! Chrome developer tools needs to be open in order for debugger to work.