Skip to content

Show unverified function breakpoints in debug viewlet #3388

@alexdima

Description

@alexdima

Testing #2832

I have a breakpoint on if (_key === key) { and I've added a function breakpoint for console.log. The breakpoint for if (_key === key) { is hit, but the console.log near the end is not hit.

I tried clicking Reapply all breakpoints which did not help in this case.

function Safe(_key) {
    var _locked = true;
    var _value = null;

    this.unlock = function(key) {
        if (_key === key) {
            _locked = false;
        }
        return;
    };

    this.lock = function() {
        _locked = true;
    };

    Object.defineProperty(this, 'value', {
        get: function() {
            if (_locked) {
                console.log('thief detected!');
                process.exit(0);
            }
            return _value;
        },

        set: function(value) {
            if (_locked) {
                console.log('thief detected!');
                process.exit(0);
            }
            _value = value;
        }
    });
}

var safe = new Safe('mySecretPassword');

safe.unlock('mySecretPassword');
safe.value = 3;
console.log(safe.value);
safe.lock();

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityon-testplanrelease-notesRelease notes issuesuxUser experience issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions