-
• #2
Hi! You can definitely program Bangle.js with VS Code - the simplest way is just to clone https://github.com/espruino/BangleApps and then run
bin/apploader.js
to push your code to the Bangle.However Bangle.js also offers line by line debug, and for that I'm afraid you need the Espruino IDE as there's no integration with VS code.
-
• #3
Thank's for the answer, i tried to run apploader.js but i think i'm doing something wrong. If i'd use espruino IDE, how can i use line by line debug?
-
• #4
how can i use line by line debug?
https://www.google.com/search?q=espruino+debugger
This result perhaps answers your question
https://www.youtube.com/watch?v=2ODoIpnTDA4
-
• #6
This might help: https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules
Were you following some docs written somewhere because if so I should probably update them to include
git clone --recurse-submodules --remote-submodules
-
• #7
Were you following some docs written somewhere because if so I should
probably update them to include git clone --recurse-submodules
--remote-submodulesUsing GitHub exstension in vsCode, i cloned bangle app using the link u gave me in previous answer. Then i ran the bin/apploader.js and this caused an error. Checking it, i saw that was core folder that after clonation remain empty. I don't if i answered well to your question, in any case thank's for the help, i'm using stackoverflow link to solve the problem and if you need more info i'll give you them.
-
• #8
The latest vscode (October 2020 update) now has support for recursive clones
https://code.visualstudio.com/updates/v1_51#_git-recursive-clone-command
Git: Recursive clone command
With the Git: Clone (Recursive) command,
you can now recursively clone Git repositories, including its nested
Git submodules. -
• #9
@parasquid thank you, now i can run apploader.js, but actually i have problems with noble, when i run it i only see in the debug console messages that are visible in the image. But i can't find a list of device in order to connect my bangle. Am i missing something?@Gordon
1 Attachment
-
• #10
Did you try running
apploader.js list
as the help message implies? -
• #11
i have to run these commands using javascript terminal? if i'm right, i'm trying to do that but it doesn't work.
-
• #12
You would have to execute them in a shell terminal (so probably bash, not JavaScript).
apploader.js
is a command-line tool. -
• #13
thank you very much now i finally understand how to do it. I'm getting this error caused by noble, that is very common. I searched how to solve it, so i used zadig to add in USB file my ble device :
usb.findByIds(0x8087, 0x07dc)
but i still get the same error.
1 Attachment
-
• #14
Ok i solved all problems, now i can list the devices, but i can't install an app through it, i'm getting an exception in heatshrink.js, it is difficult to understand due to the way is written. I will attach an image with the exception underlined, if it persists i think i will leave the idea to use vscode.
Thank's a lot anyway.
1 Attachment
-
• #15
Hmm, I have no idea what the error could be I'm afraid.
You could try editing
core/js/appinfo.js
and removing the lineheatshrink = require("../lib/heatshrink.js");
- that should disable heatshrink, which might help you. -
• #17
Ok, I think to get started, the Espruino IDE is definitely the best bet. I know it's not as shiny as VS Code, but it's designed to 'just work'.
Maybe after you've used it for a bit you can revisit the apploader and it might make more sense?
hello,
i have a Bangle.js from few days, i'd like to write and debug my code using VS code. I saw the possibility to do it with espruino board but i didn't understand if it is possible with bangle.js. Espruino web IDE is very usefull with simple code, but when the code becomes bigger and complex it is difficult to figure out with it mostly when there is something unexpected in the behaviour. if someone has some tips i'm very glad to hear them.