Core2 / VSCode : "Cannot read property 'sendCommand' of Undefined"



  • Hey!

    I'm having problems with running code from VSCode on Core2, since my VSCode auto updated recently. When I click the "Run in M5Stack" button in VSCode...

    "Cannot read property 'sendCommand' of Undefined"
    0_1647014595074_f3d69a5e-c864-40a7-a5bb-078c272cec36-image.png

    Has anyone else experienced this? Is there a fix?

    H.



  • Just replying to an old topic as it might help someone in the future - I was just struggling with the same error. Turns out you need to be editing a python file on the device itself to be able to run it. Under the 'main.py' tab at the top right of your screen shot, you can see that this file is located in folder 'm5stack ...'. This should show 'COM8 > flash > main.py' or similar if you are editing the version on the device (just click on the 'main.py' under your highlit 'COM8' on the bottom left to select the file on the device before trying to run rather than the file on your local PC).