Javascript debugger showing undefined variables, while Chrome works

I want to debug Javascript code in PhpStorm. The breakpoint is hit, however, some of my variables are displayed as 'undefined' in the PhpStorm, while they display proper value in Chrome:

Here's my Javascript debugger setup:

Is this a bug, or am I donig something wrong?

0
5 comments

Sorry, I can't see that in the PhpStorm editor: is instanceConfig shown as undefined there?

0
Avatar
Permanently deleted user

 The error says: 'can not read property 'instanceConfig' of undefined. That means, 'this.appConfig' is evaluated as 'undefined' in PhpStorm, however it evaluates as proper object in Chrome debugger.

0

Such problems are usually caused by sourcemap issues (when certain property has a different name in transpiled code, and no name mappings are there, for example).

Please provide a project that can be used to recreate the issue, so that I can check if this is a configuration problem, bug in PHPStorm or a third-party tool issue

1
Avatar
Permanently deleted user

I can't share the project, it's too complex .. Can you please be more specific what strings are checked and what can I do in order to fix the problem?

0

I don't understand your question, sorry. For each statement in the executed code the debugger tries to find the matching statement in the source code using source maps. If certain variabled that is called `foo` is transpiled to `__foo`, and no name mappings are provided, attempts to evaluate `foo` will result in ReferenceError, as no such variable can be found in code loaded in VM

0

Please sign in to leave a comment.