Skip to content

Go to Definiton does not work in JavaScript namespace #27045

Closed
@StaticNoiseLog

Description

@StaticNoiseLog
  • VSCode Version: Code 1.12.2 (19222cd, 2017-05-10T13:20:36.315Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author Version
vscode-eslint dbaeumer 1.2.11
vscode-firefox-debug hbenl 0.13.1
debugger-for-chrome msjsdiag 3.1.1
unity-debug Unity 1.2.0

Steps to Reproduce:

  1. Create a JavaScript File with this content (the variable c99 is used to wrap the Game class in its own namespace, a common pattern in JavaScript):
var c99 = {};

c99.Game = (function () {
    function Count99Game() {
        console.log('Count99 game starts.');
        this.initGame();
    }

    Count99Game.prototype.initGame = function () {
        this.nextCountLabel = document.getElementById('next-count');
    };

    return Count99Game;
})();
  1. Right-click on the "initGame" function on line 6 and choose "Go to Definition". Nothing happens. Expected behavior: The cursor should be positioned on line 9 where the function is defined. Works in NetBeans, for example.

Metadata

Metadata

Assignees

Labels

upstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions