microsoft / pxt-adafruit

Microsoft MakeCode editor for Adafruit Circuit Playground Express
https://makecode.adafruit.com
Other
81 stars 77 forks source link

Unhandled rejection TypeError: Cannot read property 'updateOptions' of undefined at e.setBreakpointsMap #998

Closed pelikhan closed 5 years ago

pelikhan commented 5 years ago
main.js:222 Unhandled rejection TypeError: Cannot read property 'updateOptions' of undefined    
at e.setBreakpointsMap (https://pxt.azureedge.net/blob/9df231f06b1662434851b715de9b1163f14a7832/main.js:113:23648)  
  at https://pxt.azureedge.net/blob/9df231f06b1662434851b715de9b1163f14a7832/main.js:5:53787From previous event:    at T.I [as _captureStackTrace] (https://pxt.azureedge.net/blob/9df231f06b1662434851b715de9b1163f14a7832/main.js:222:16130)    
at T._then (https://pxt.azureedge.net/blob/9df231f06b1662434851b715de9b1163f14a7832/main.js:222:41710)    
at T.done (https://pxt.azureedge.net/blob/9df231f06b1662434851b715de9b1163f14a7832/main.js:222:40135)    
at e.<anonymous> (https://pxt.azureedge.net/blob/9df231f06b1662434851b715de9b1163f14a7832/main.js:5:4130)    
at later (https://pxt.azureedge.net/blob/7e03e0a67a1f6e9dba8754dfbec54f2314bab5c1/pxtapp.js:900:34)
pelikhan commented 5 years ago

This is the usual "editor not loaded yet" issue. https://github.com/Microsoft/pxt/blob/c3f93aac4db42b3e8505cd90ec51b7d810dc9a6a/webapp/src/app.tsx#L2296 IMO we should ignore setting breakpoints until the editor gets loaded - otherwise we will defeat lazy loading of monaco/blockly.