Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running MakeCode locally does not save projects on filesystem #6021

Open
lobodpav opened this issue Nov 28, 2024 · 5 comments
Open

Running MakeCode locally does not save projects on filesystem #6021

lobodpav opened this issue Nov 28, 2024 · 5 comments

Comments

@lobodpav
Copy link

lobodpav commented Nov 28, 2024

Describe the bug

Following the official instructions I have run MakeCode locally.

The documentation states that

If you have created a PXT project from the web browser, you can go to its folder (it will sit under projects) and use the CLI to build and deploy it.

However, the project directory is empty.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a folder of your liking, say /Users/pavel/makecode
  2. As stated in the CLI documentation, run:
    npm install -g pxt
    mkdir microbit
    cd microbit
    pxt target microbit
    pxt serve
  3. The application opens up in Chrome at http://localhost:3232/index.html#editor
  4. Create a new project called test and do some changes
  5. Run ls -la /Users/pavel/makecode/microbit/projects

Expected behavior
The directory listing should show a test directory with the project content.

Actual behavior
The /Users/pavel/makecode/microbit/projects directory is empty.

Desktop (please complete the following information):

  • Computer: MacBook Pro M2 Max
  • OS: macOS Sequoia 15.1.1
  • Browser: Chrome v131.0.6778.86
  • pxt-core: v11.3.3
@tballmsft
Copy link
Contributor

I don't think that this has ever been the behavior of PXT running locally from localhost. The projects are stored in browser local storage. @abchatra ?

@tballmsft
Copy link
Contributor

I think this may have been true in the very distant past. Probably the docs should be updated.

@lobodpav
Copy link
Author

lobodpav commented Dec 4, 2024

Right, so what's the recommended local development approach when coding micro:bit apps?
In my eyes, developing in VS Code is a far better experience than in MakeCode.
However, the absence of a simulator means that I have to push the code to GitHub, go to MakeCode on the web and pull the changes.

@tballmsft
Copy link
Contributor

tballmsft commented Dec 4, 2024

Understand about local development; two things:

  1. The makecode web app has github integration; have you tried that? Not local solution, of course.
  2. There is a branch of vs code for makecode with micro:bit here: add basic support for simx vscode-makecode#179 - still needs some love. Try it out and give us feedback! You need to load the extension locally into vs code (clone the above branch and open in vs code)

@lobodpav
Copy link
Author

lobodpav commented Dec 5, 2024

Actually, I use IntelliJ for my daily business as well as for micro:bit coding. I use the GitHub integration, but it's a tedious process: push, go to MakeCode, click on the GitHub icon, pull changes, and look for the specific TS file I had open before pulling. Tens of times a day ☹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants