Open fatcerberus opened 4 years ago
Repro'd using SSj (miniSphere's commandline debugger). I don't know how to debug in ch so can't repro there.
src/main.js:20 main()
(ssj) l 20
10 import TitleScreen from './titleScreen.js';
11
12 import './defineScenelets.js';
13
14 global.console =
15 new Console({ hotKey: Key.Tilde });
16
17 export default
18 async function main()
19 {
-> 20 Scene.defaultPriority = 99;
21
22 console.defineObject('bgm', null, {
23 'override'(fileName) { Music.override(fileName); },
24 'pop'() { Music.pop(); },
25 'play'(fileName) { Music.play(FS.fullPath(`${fileName}.ogg`, 'music')); },
26 'push'(fileName) { Music.push(FS.fullPath(`${fileName}.ogg`, 'music')); },
27 'reset'() { Music.reset(); },
28 'stop'() { Music.override(null); },
29 'volume'(value) { Music.adjustVolume(value); },
src/main.js:20 main()
(ssj) x TitleScreen
prop __proto__ {...} *3
prop message "'TitleScreen' is not defined"
prop description "'TitleScreen' is not defined"
prop number -2.14682e+09
prop stack "ReferenceError: 'TitleScreen' is not defined
at eval code (eval code:1:1)
at main (src/main.js:20:2)
at Generator.prototype.next (native code)"
Above you can see that that TitleScreen
is in scope (as an import) but attempting to evaluate it at the breakpoint produces a ReferenceError.
This is a debugger feature request - access to module scope variables.
Attempting to evaluate a variable which exists in module scope, for example an
import
ed identifier, while paused at a breakpoint inside a function within that same module, will throw a ReferenceError, as though the identifier isn’t in scope.