Code Monkey home page Code Monkey logo

pymakr-vsc's People

Contributors

dependabot[bot] avatar jakobrosenberg avatar josverl avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymakr-vsc's Issues

Receiving the error while installing the paymakr on atom

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What happens?

I am receiving the errors that There was an error with your serial port module, paymakr will likely not work properly. ....

Screenshot from 2019-10-12 22-38-59

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

Any other comments?

What versions of the software are you using?

Operating system: Ubuntu 18.10

Pymakr version: 1.4.17

🚀MCU explorer [Enhancement]

Feature Request 🚀

Add a file explorer t show the files on the devboard

Based on : \vscode-extension-samples\tree-view-sample

Under the listed folder
• / root fs , may be empty)
• /flash
• /sd (if mounted)

Primitives
- ListDir -recursive
- Upload single File
- Download Single File
- Delete file
- Rename file
- Copy file (on MCU )
- Run file on board (exec( foo.py )
- Import file on board (import foo
- View File (download & view )
Actions / use cases :

  • Refresh on initial connect
  • Refresh on demand
  • Refresh on upload / synch
  • Refresh after run (optional)
  • Auto Upload a file after local Save (using file filters)

Solution Approach

  • There already is a sample of a VSCode extension that renders a treeview of files. this can be adopted
  • a new I/ improved methods is needed to list the files on the board as the current implementation of list files does not appear to be able to reliably list the files on the board. For this I already have a PoC python scriptlet that returns all files and folder and optionally the CRC32 checksum as a json object

this would also allow a lot of rather complex code flows to list / traverse folders to be replaced by a much simpler approach.
to only downside that I can see is that the script and generating the JSON will have somewhat larger memory requirements than the current approach.
https://gist.github.com/Josverl/a6f6be74e5193a8145e351ff9439ae3e

Development environment \incorrect dependencies

The steps to reproduce this issue?

  1. On windows 10
  2. Clone the repo
  3. npm install --save-dev babel-core

What happens?

C:\develop\repro\pymakr-vsc>npm install --save-dev babel-core
npm ERR! code ETARGET
npm ERR! notarget No matching version found for parser-regex@^1.0.5
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'serialport'
npm ERR! notarget

image

An indeed there is no 1.0.5 version on NPM

npm view parser-regex
shows that the latest: 1.0.2

A similar error is shown in my regular environment.

What were you expecting to happen?

environment to work

Any other comments?

This may have to do with different version of the serial library, as I tried to experiment with multiple version of that a while ago. I assumed I cleaned that all up , but there may be stray libraries.

What versions of software are you using?

Operating system:

VSCode version:
n/a

Pymakr version:
https://github.com/pycom/pymakr-vsc.git

Unavailable to upload code to the device

Hi :),
I'm using the Pymakr Plugin on Visual Code, I saw some changes were applied on pymakr.
However, I'm unavailable to upload the code to the ESP32 device, the terminal shows the following trouble.
image
I made some tries, but none of those were successful.
Note: using Atom editor, works fine!

Thanks in advance!

Pymakr does not work on VSCode x64 on Windows

Console shows:

Activating extension pycom.Pymakr failed: %1 is not a valid Win32 application.
\?\C:\Users\myuser.vscode\extensions\pycom.pymakr-0.1.1\precompiles\serialport-win32\build\Release\serialport.node

However it is working on VSCode x32.

command pymakr.connect not found

I have still same error :command pymakr.connect not found
Im using VSCODE on Opensuse Tumbleweed
Can you help for this issue ?

Error "command 'pymakr.globalSettings' not found" in VSC 1.33.1 + latest plugin version

What happens?

After installing all above I tried to use "Pymakr > Global settings" to setup my connection to the LoPy4 but I just get the error message "command 'pymakr.globalSettings' not found".
I also tried to use other pymakr commands from the Command Palette and with all commands I get this kind of error. Also in the left down corner there is no pymakr related gui elements which should be there.

What were you expecting to happen?

Getting the gui elements and that the commands are working.

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

Not yet but I am willing to help and to provide logs if needed.

Any other comments?

Installed Software:

VSC (output of "Help" -> "About"):
Version: 1.33.1
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:20:22.771Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.19.0-4-amd64

node.js LTS version:
https://packages.debian.org/de/buster/nodejs

npm (just in case):
https://packages.debian.org/de/buster/npm

What versions of software are you using?

Operating system: Debian Buster all updates installed

VSCode version:1.33.1

Pymakr version: 1.1.0

Pymakr(1.0.3) error from last update vsc (1.27.2)

Before update it can work normally after install update, When i start VSC it auto connect to board from address in file pymakr.json warnning show
(Running the contributed command:'pymakr.connect' failed.) i can't command in pymakr.

VS Code version: Code 1.27.2 (f46c4c4, 2018-09-12T16:17:45.060Z)
OS version: Windows_NT x64 10.0.17134
Pymakr version: 1.0.3

Unable to Download Recursive Files

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. Have existing files on device under one or more sub directories (i.e /ROOT/subdir/file.py)
  2. Attempt to download files from device
  3. Only files located under /ROOT download, while any under a sub dir report as failed.

What happens?

  • Any files not placed directly in the root directory fail to download
  • The reported path in terminal is mangled as so:
# Actual Path: /stubs/esp32_1_10_0/gc.py
[18/66] Reading stubsesp32_1_10_0/gc.py
Failed to download stubsesp32_1_10_0/gc.py
  • Pymakr hangs when attempting to create any missing directories on the host to match the tree on the MCU

What were you expecting to happen?

  • Any missing directories should be created on host
  • Any files under sub directories on the MCU should have downloaded

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

  • N\A

Any other comments?

  • In shell-workers.py (Line 69) roughly 200 empty bytes such as this: \0x00 were populating the list of supposed files, therefore all going through the callback.

What versions of software are you using?

Operating system:

  • Linux 5.0.9-arch1-1-vfio x86_64 GNU/Linux (Manjaro)

VSCode version:

Version: 1.33.1
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:20:22.771Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 5.0.9-arch1-1-vfio

Pymakr version:

  • 1.1.2

Unable to synchronise project

Hi,

I'm trying to update a project I had previously running on a LoPy board and am currently unable to sync the project from Visual Studio Code.

I have updated my version of node.js to the current LTS (8.9.4), and am running Visual Studio Code 1.19.2, Date 2018-01-10 Shell 1.7.9 Renderer 58.0.3029.110, Node 7.9 Architecture x64 with Pymakr 0.1.7. I have also run the firmware updater on the LoPy device and it is running the latest firmware. I am running Visual Studio code under 64bit Windows 10.

Before performing all the updates today I could not connect to a LoPy at all. Getting the error "command 'pymakr.connect' not found". Having performed the updates to the above version I can now connect to a LoPy device sucessfully, however, I am currently unable to synchronise the project and get the error "command 'pymakr.sync' not found.

Do you have any suggested solutions to this problem? Many thanks.

bug in disconnect() makes it impossible to re-connect without reloading vscode

What are the steps to reproduce this issue?

  1. start up vscode , connect a generic esp32 board
  2. works as expected
  3. physically unplug board , and re-attach

What happens?

  1. pycomm is not able to connect / disconnect any more

What were you expecting to happen?

I expect to be able to disconnect and reconnect

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)
VSCode shows an error and is unable to connect any more
X Running the contributed command:'pymakr.toggleConnect' failed.

a rough workaround is to reload the VSCode window using >Reload Window

Any other comments?

there appears to be a bug in the connect function; it references _this. while is should reference this.

disconnect(cb){
    this.logger.info("Disconnecting...")
    if(this.pyboard.isConnecting()){
        this.terminal.writeln("Connection attempt canceled")
    }
    // else{
    //   this.terminal.writeln("Disconnected. Click here to reconnect.")
    // }
    clearInterval(this.connection_timer)
    this.api.setConnectionState(_this.pyboard.address,false) // <-- _this does not exists ….
    this.pyboard.disconnect(function(){
      if(cb) cb()
    })
    this.synchronizing = false
    this.runner.stop()
    this.setButtonState()
}

What versions of software are you using?

Operating system:
Windows 10 [Version 10.0.17134.285]

VSCode version:
Version: 1.27.2 (system setup)
Commit: f46c4c469d6e6d8c46f268d1553c5dc4b475840f
Date: 2018-09-12T16:17:45.060Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Pymakr version:
1.0.3

Unable to upload files on M5 Stack using VS code. Possibly a conflict with Pymakr

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. I am working on a weather station code using Micropython on VS code. What I observed that while uploading the files on M5Stack using a VS code, it gets stuck on the files which has code connecting to the wi-fi. For example in weather station the main file actual size is 2KB however it shows 0KB in VS code during upload to M5 Stack. I have already tried with 3 different M5Stack devices and on 2 separate computers as well. In order to be sure I also tried uploading different files as well. The files without the wi-fi folders were already uploaded however any file which required a wi-fi connectivity, say connecting it to the hotspot it gets stuck while uploading. I am attaching the error log I got under "toggle developer tools" in this email. I am not sure if it is the pymakr version that is creating the issue or something else. However, it used to work before say last month and then all of a sudden the upload stopped. I've even tried resetting my computer however it was of no avail. Since it was working before in January, I've tried with the older version of VS code but was of no avail. So, far what I think it maybe a configuration issue with the pymakr plugin after a certain update however, since my knowledge is on a beginner scale I am not certain. I have already

What happens?

What happens is the upload gets stuck and it doesn't continue. Reconnecting and rebooting the device doesn't help either.

What were you expecting to happen?

I was expecting the upload to finish and then the weather station device(M5 Stack)
to work

Any logs, error output, etc?

https://gist.github.com/prateekchikara/037203fb42c6201bfc07a7f4fa0e53f1

Any other comments?

What versions of software are you using?

Operating system:

Windows 10

VSCode version:

1.32.1

Pymakr version:

1.0.7

command 'pymakr.globalSettings' not found

Hi how is life...

Working on win 10 and VS Code 1.38

Did install PyMakr through the extention market place
No command is found... seem like it doesn't see the installation
But seem to be install in the good place with the other extension
C:\Users\blablabla.vscode\extensions

If any can help, would be very welcome...

It make a few evening searching... and nothing

Best Regards,

Steph

UX does not always show the correct Connected/Disconnected or Running state

Steps to reproduce this issue?

  1. connect to a board
  2. upload and run a failing script
  3. manually reset the board

What happens?

  • Ux still shows Connected and Running
  • when you disconnect and reconnect , the connection state is fixed , ( in 1.0.3)
    ** however even then the Run state still shows running

in other cases ( mostly when pymakr has not been able to sucesfully connect on the first attempt) the connect state always shows as disconnected [ X Pycom console ]

What were you expecting to happen?

at best :

  • the running and connect state to automatically detect the restart
  • the connect state to always show connected when connected

at least :

  • the connect state to show connected after a successful re-connection
  • the run state to be stopped / reset on connect

What versions of software are you using?

Operating system:
Microsoft Windows [Version 10.0.17763.195]

VSCode version:
Version: 1.30.2 (user setup)
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:54:13.295Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 10.0.17763

Pymakr version:
1.0.4

Not working with July 2018 release

My VS Code auto-updated to the July 2018 release, Version 1.26.0 (1.26.0). Since then, the pymakr extension has stopped working. My system is running MacOS High Sierra 10.13.6 and my installed node-js is v6.11.2.

I've tried reinstalling the pymakr extension, then restarting VS Code. I've tried disabling, restarting, reloading, and even restarting my Macbook, etc etc. but continue to errors when trying to use any of the pymakr commands. These all worked just fine previous to the vs code update. For instance, when selecting typical commands, I get an an saying "command 'pymakr.projectSettings' not found" or "command 'pymakr.help' not found".

I've tested the issue by downgrading to the June 2018 VS Code release and pymakr works fine again, but stops working as soon as I update to July 2018.

I'd like to be able to update VS Code going forward while still using your extension -- if there is something I can do to help debug let me know?

"py_ignore" setting in pymakr.conf and pymakr.json ignored

What are the steps to reproduce this issue?

  1. Open VSC
  2. Connect LoPy4 + Pytrack board via USB
  3. Use the "Upload" function

What happens?

File project.pymakr gets synced even if it is marked as to be ignored via "py_ignore" setting in pymakr.conf and pymakr.json. Also that file is not included in the project folder, so I do not know where it is taken from.
It seems to include SHA256sums of boot.py and main.py.

What were you expecting to happen?

Either the file should be synced to verify that the files where transmitted/uploaded correctly via the serial/wifi connection, then it should be removed from "py_ignore" setting in pymakr.conf and pymakr.json. Or it should not be synced and the "py_ignore" setting in pymakr.conf and pymakr.json is correct, then the upload is a bug because it should not be uploaded as defined in this two files.

But after reading the terminal output, the file seems to be needed to check the project status so it should be removed from "py_ignore" setting in pymakr.conf and pymakr.json. Maybe a leftover from earlier days.

Any logs, error output, etc?

If deleting the file before uploading the project I get a

Reading file status
Failed to read project status, uploading all files

in the terminal.

If NOT deleting the file before uploading the project I get a

Reading file status
No files to upload

in the terminal.

Any other comments?

What versions of software are you using?

Operating system: Debian Buster all updates installed

VSCode version: 1.33.1

Pymakr version: 1.1.2

Ubuntu. NodeJS not detected on this machine!

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.15.0-72-generic snap

Welcome to Node.js v13.0.0-nightly20190802452b393c1f.
Type ".help" for more information.

permanent Fix for the serialport problem

Feature Request 🚀

Is your feature request related to a problem? Please describe.

see issues #4 #11 #28 #42 #53 #54
When vscode updates to an electron version that has a different ABI, the serialport module breaks
These updates seem to come unexpected for end-users.

Describe the solution you'd like

during packaging add the native bindings for :

  • multiple platforms

  • multiple electron versions ( ABI versions more specifically)
    this can be done by a script ( approx 200 lines of ps1 code)

  • test against the insiders build of vscode to pre-empt version changes , and publish updates containing updated native bindings, before they are rolled out to the general public

this would need to be done by an automated build/test system
the reference uses Azure Pipelines which is free for open source projects such as pymakr.

This is described in the reference implementation documented at :
https://github.com/Josverl/pymakr-vsc/blob/fix/SerialMultiPlatform/doc/multiplatform%20support.md#multiplatform-support

Describe alternatives you've considered

see the discussion on #53

Proposed implementation

im working on a PR , but as it is quite large, may need to work to bring it into shape.

VScode gets stuck in "Installing" state

What are the steps to reproduce this issue?

  1. Install / upgrade the pymakr extension in vscode or via the command line
  2. Remove extension using vscode --uninstall-extension pycom.pymakr
  3. Try again, vscode --install-extension pycom.pymakr --verbose

What happens?

VSCode gets stuck in the "Installing" state. No verbose logs.

What were you expecting to happen?

installing the extension

Any logs, error output, etc?

Nope

Any other comments?

This might be related to #28

What versions of software are you using?

Operating system: Ubuntu bionic

VSCode version: 1.31.0

snap list 
[snip]
vscode                 1.31.0-1549443364       77    beta      snapcrafters  classic

Pymakr version: 1.0.6

[typo] in 'All items overritten' --> 'overwritten'

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. Download files from the MCU

What happens?

Message is shown : All items overritten

What were you expecting to happen?

Message to read : All items overwritten

Pymakr version:
1.1.3

board waiting in bootloader after reset

What are the steps to reproduce this issue?

  1. start vscode , connect generic ESP32 (M5Ssack. Lolin32Pro, others)
  2. connect to the board
  3. reset the board using a physical reset button

What happens?

  • the board will reboot, but wait in the bootloader for a firmware download that never starts
  • This is likely caused by the board booting while USB / Serial DTR is High , in combination with an autodownload circuit

What were you expecting to happen?

  • the board to boot normally

Any logs, error output, etc?

  • The terminal shows something like :
    '

ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x27 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
'

Any other comments?

I have created a fix/workaround for this by setting rts to high in pyserial - sendPing() for windows
but I have not been able to test it on other platforms or with other devices

What versions of software are you using?

Operating system:
Microsoft Windows [Version 10.0.17134.285]

VSCode version:
Version: 1.27.2 (system setup)
Commit: f46c4c469d6e6d8c46f268d1553c5dc4b475840f
Date: 2018-09-12T16:17:45.060Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Pymakr version:
1.0.3

CTRL+E doesn't work on Windows

Pressing CTRL+E to enter paste mode on the REPL opens a text box field on VS Code, instead of enabling paste mode on the MicrPython REPL. It's possible that other shortcuts are affected by this same problem.

command not found with Pymakr(1.1.3) and Visual Studio Code(1.36.1)

What are the steps to reproduce this issue?

  1. Start Visual Studio Code
  2. Install Pymakr plugin

What happens?

Plugin doesn't work, I cannot see the Pymakr console, and all shortcut fail:
CTRL + SHIFT + C = command 'pymakr.connect' not found
CTRL + SHIFT + G = command 'pymakr.globalSettings' not found
...

What were you expecting to happen?

Things used to work with previous VS Code version installed (don't know exactly which version)

Any logs, error output, etc?

Nope (don't know where I can get some ?)

Any other comments?

I tried to disable / enable the plugin, no chance
I tried to uninstall / install the plugin, no chance

What versions of software are you using?

Operating system:
Linux ubuntu 18.04.2 LTS

VSCode version:
1.36.1

Pymakr version:
1.1.3

Extension gets in the way when working on other projects

Hi, first of all thanks for providing this extension. After using it a bit I would like to share some feedback. I'm using VSCode for different kinds of projects (Python, Go, JS, HTML, ...).

When working on non-Pycom (LoPy) related projects, I experience that this extension takes over VSCode a bit too much and gets in my way. My current flow is that I disable this extension completely, and only enable it manually when working on Pycom related code. This should not be needed.

What I would like is:

  • Remove the extension buttons and menu's from the status bar
  • That this extension does not change the default behavior of opening the terminal window (when working on a *.go file, I don't want the Pycom terminal, I want a normal shell)

I think it would be sufficient when the extension shows the available commands in the Command Palette when the editor is in the context of a *.py file and that people are able to open a Pycom terminal through this Command Palette, instead of changing this default behavior.

Not having node installed leads to unusable IDE

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. Install the Pymakr extension without Node installed

What happens?

A constant stream of error popups that are too fast to see what they say and render VS Code unusable
Fix is to install Node, but no obvious indication this should happen

What were you expecting to happen?

VS Code should be usable, and maybe a single error telling you to install Node.
Ideally give the option for an auto install of Node

What versions of software are you using?

Operating system:
Windows 10

VSCode version:
1.33.1

Pymakr version:
1.0.7

Too many Pycom Console terminals are created which can not be killed

What are the steps to reproduce this issue?

  1. Open VSC
  2. Connect LoPy4 + Pytrack board vis USB
  3. Run different commands from the pymakr plugin

What happens?

More than one Pycom Console is created but they can not be closed. If trying to close them via the Kill Terminal button in VSC in the right down corner, they get recreated even if they do not have any use.

What were you expecting to happen?

Just one Pycom Terminal should be created.

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

temp3
temp2
temp1
temp

Any other comments?

What versions of software are you using?

Operating system: Debian Buster all updates installed

VSCode version: 1.33.1

Pymakr version: 1.1.0

Plugin terminal problem

Just moving this issue from the pymakr-atom repo as I created in the wrong repo.

History: sg-wireless/pymakr-atom#31

Still having the problem that I can only connect via WIFI. Has anybody been able to connect to the Pycom device (in my case a LoPy) via USB Serial ?

Extension fails to load if invalid pymakr.conf is in workspace

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. Open a folder in vscode
  2. Create a pymakr.conf file with invalid json. In my case it was a trailing coma on the last line.
  3. Reload vscode (it should reopen the same folder).

What happens?

On restart, the pymakr extension won't load.

What were you expecting to happen?

The extension should load, reporting an error in the conf file and ignoring its content.

Any logs, error output, etc?

Here are my global settings:

{
	"address": "/dev/tty.wchusbserial640",
	"username": "micro",
	"password": "python",
	"sync_folder": "",
	"open_on_start": true,
	"safe_boot_on_upload": false,
	"py_ignore": [
		"pymakr.conf",
		".vscode",
		".gitignore",
		".git",
		"project.pymakr",
		"venv"
	],
	"fast_upload": false,
	"sync_file_types": "py,txt,log,json,xml,html,js,css,mpy",
	"ctrl_c_on_connect": false,
	"sync_all_file_types": false,
	"auto_connect": false,
	"autoconnect_comport_manufacturers": [
		"Pycom",
		"Pycom Ltd.",
		"FTDI",
		"Microsoft",
		"Microchip Technology, Inc."
	]
}

The developer's tools console report the error (notice the trailing comma on the last line):

TypeError: Cannot use 'in' operator to search for 'address' in {
    "address": "/dev/tty.wchusbserial640",
    "username": "micro",
    "password": "python",
    "sync_folder": "",
    "open_on_start": true,
    "safe_boot_on_upload": false,
    "py_ignore": [
        "pymakr.conf",
        ".vscode",
        ".gitignore",
        ".git",
        "project.pymakr",
        "venv"
    ],
    "fast_upload": false,
    "sync_file_types": "py,txt,log,json,xml,html,js,css,mpy",
}

Any other comments?

What versions of software are you using?

Operating system:

MacOS 10.13.6

VSCode version:

1.33.1

Pymakr version:

1.1.0

🚀 Enhanced colors displayed in the REPL

Feature Request 🚀: Enhanced Colors displayed in the REPL

Currently the PyMakr REPL is missing some shade of gray.
E.g. displaying the same grey text:

  • under PyMakr REPL:
    Image2
  • under Putty:
    Image
    Can PyMakr REPL color management be enhanced?

No REPL with COM port connection

Hi all,
Pymakr plugin is simply not working. The Pycom Console button on the bottom line toggles by clicking on it between cross and hook, regardless if there is a device connected to the computer or not. The "List Serial Ports" command, does just nothing.
My box works on Windows 10 x64. My Pymakr plugin for Atom is also broken. Maybe I go back to something working, till the Pymakr tools work properly.

Cheers,
Thomas

Connects to wrong COM-Port and can't choose other port

What are the steps to reproduce this issue?

  1. Put 2 COM-port devices into computer
  2. Try to connect to the device that isn't 'recognized'

What happens?

I'm trying to connect to my Pycom while there's also another COM device connected. Following this tutorial I pasted 'COM20' into the address in pymakr.json, but when I run 'Pymakr > Connect' it tries to connect on 'COM24'

What were you expecting to happen?

Connecting op COM20

Any logs, error output, etc?

//Pymakr > List serial ports:
Found 3 serialports
COM24 (Microsoft) (copied to clipboard)
COM20 (Microsoft)
COM1 ((Standaardpoorttypen))

// Pymakr > Connect
Connecting to COM24...

Failed to connect (Error: Port is not open). Click here to try again.
Connecting to COM24...
Failed to connect (Error: Port is not open). Click here to try again.

pymakr.json
{
"address": "COM20",
"username": "micro",
"password": "python",
"sync_folder": "",
"open_on_start": true,
"safe_boot_on_upload": false,
"py_ignore": [],
"fast_upload": false,
"sync_file_types": "py,txt,log,json,xml,html,js,css,mpy",
"ctrl_c_on_connect": false,
"sync_all_file_types": false,
"auto_connect": true,
"autoconnect_comport_manufacturers": [
"Pycom",
"Pycom Ltd.",
"FTDI",
"Microsoft",
"Microchip Technology, Inc."
]
}

Any other comments?

Deleting "Microsoft" from autoconnect_comport_manufacturers makes it not connect to COM24 anymore, but doesn't let me connect to COM20 either. It seems that the address parameter doesn't work at all.

What versions of software are you using?

Operating system:
Windows 10

VSCode version:
Version: 1.32.3 (system setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
Pymakr version:
1.0.7

There was an error with your serialport module, Pymakr will likely not work properly.

(Hi! 👋 Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. Install Pymakr on VSCode

What happens?

An error pops up.

What were you expecting to happen?

I was expecting no error to pop up.

Any logs, error output, etc?

There was an error with your serialport module, Pymakr will likely not work properly. Please try to install again or report an issue on our github (see developer console for details)

https://gist.github.com/MJtuks/6e16d397690be9a67418b5fec4e54e01

Any other comments?

What versions of software are you using?

Operating system:
Windows 10

VSCode version:
Version: 1.39.2 (user setup)
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019-10-15T15:35:18.241Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

Pymakr version:
1.1.3

Error "Running the contributed command: 'pymakr.upload' failed."

What are the steps to reproduce this issue?

  1. Open VSC
  2. Connect LoPy4 + Pytrack board vis USB
  3. Try to upload or download files to/from the LoPy4

What happens?

Executing the code to let the led blink works fine ("Pymakr > Run Current File"). But I am not able to upload or download files via USB. Connecting via Wifi and then FTP works fine.

What were you expecting to happen?

Uploading and downloading from the LoPy4 should work.

Any logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)

See attached screenshot

Any other comments?

What versions of software are you using?

Operating system: Debian Buster all updates installed

VSCode version: 1.33.1

Pymakr version: 1.1.0

Uploading files gets interrupted by WDT

What are the steps to reproduce this issue?

  1. Configure a WDT on boot (import pycom ; pycom.wdt_on_boot(True) ; pycom.wdt_on_boot_timeout(15000)).
  2. Set "safe_boot_on_upload": true.
  3. Upload a big or large number of files, so the upload takes over 15 seconds (or whatever the WDT is configured to).
  4. Watch it failed to update because the WDT reset the board.

What happens?

The WDT resets the board while files are being uploaded.

What were you expecting to happen?

When safe booting, I expect Pymakr to take control over the WDT and keep feeding it throughout the upload.

VSCode F5 run/debug?

Is it possible to F5 debug (or even just stop and run with no debugger attached) in VSCode?

The REPL is fantastic, but hitting CTRL+SHIFT+C, CTRL+SHIFT+R every time is a bit tedious. Or perhaps it's there and I don't know the proper launch.json config settings?

Download/synch function is unable to download/list files reliably

What are the steps to reproduce this issue?

this is an extreme repro, but as i found the download to be unreliable I wanted to narrow down the issue or issues

  1. use a board with a pre-existing file structure on the flash
  2. remove / rename the boot.py
  3. reset the board & connect with pymakr
  4. try to sync download

What happens?

pymakr is unable to download any files.
the reason for this is that import os is missing from the code that is used to list the current files on the board
in addition the resulting error condition is not detected/handled properly

What were you expecting to happen?

the download to work robustly

Any logs, error output, etc?

After additional additional errorhandling the following error messages become apparent :

[silly] Sync | Entered raw mode
[verbose] Pyboard | Executing code:import ubinascii,sys
list = ubinascii.hexlify(str(os.listdir('/flash/')))
sys.stdout.write(list)
[silly] Pyboard | Executed raw code, now resetting
[info] Pyboard | Soft reset
[silly] Pyboard | Received message: OK
[silly] Pyboard | Buffer length now 2
[silly] Pyboard | Waiting for >
[silly] Pyboard | Received message: �Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
NameError: name 'os' is not defined
�>

Any other comments?

fixing this specific error is trivial by adding the import to import ubinascii,sys --> 'import ubinascii,sys,os'

I would suggest that the download code should is by adding errorhandling and retries as there are additional cases in which errors are returned by the board , and not detected.
as a result the error messages are treaded as base64 encoded strings , and an attempt is made to decode these , and the resulting downloaded file is corrupted or contains garbled information at best.

also the download code does not close the files, which will/might consume/leak memory on the MCU leading to failed downloads once memory is exhausted.
I'm not quite sure if the raw repl + reset (Ctrl-A, , CTRL-D will be able to free the memory in this case, but I think its better to avoid the lead than assume that the RAW Repl will cleanup

What versions of software are you using?

Operating system:
Microsoft Windows [Version 10.0.17763.55]

VSCode version:

Version: 1.28.1 (system setup)
Commit: 3368db6750222d319c851f6d90eb619d886e08f5
Date: 2018-10-11T18:13:53.910Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Pymakr version:
1.0.3

Other ESP32 boards

Hello all,

I want to ask you to take a look to video attached, where I connect ESP32 board to my PC and Flash it by micropython Firmware (not in video), but I want to upload my main.py into board but unfortunatelly with no access. VS Code fall every time.

  1. I tested almost all Firmware version
  2. VS Code updated to version: 1.33.1
  3. I corrected Pymark 1.1.0 by correction set in this issue (@RalphHogenbirk solution):
    "In any case, running the command node scripts/install.js from your user/.vscode/extensions/pymakr-1.1.0/ folder, should solve the issue for now @JavierNR @Jerremy09 @rodgergr @ttadam"
  4. Node.js: 10.15.1
  5. Architecture: x64

but is it even possible to operate different ESP board?

  1. REPL - works
  2. Run - works
  3. Upload - do not work

Link: https://www.youtube.com/watch?v=gXn_wUPcgmw&feature=youtu.be

Thank you for help

Jan

Upload Failed

OS: Ubuntu 16.04
Python 2.7
PyMakr VScode extension 0.1.7
Reason: there is no possible upload file to board.

Connecting on /dev/ttyUSB0...

>>> import esp
>>> esp.check_fw()
size: 600872
md5: 35e285a80516e70242ebf7d780d6c70f
True
>>>
Uploading project (main folder)...

Reading file status
Failed to read project status, uploading all files
[1/2] Writing file boot.py
Upload failed. Please reboot your device manually.

MicroPython v1.9.3-8-g63826ac5c on 2017-11-01; ESP module with ESP8266
Type "help()" for more information.
>>>

Seems this bug is very similar to sg-wireless/pymakr-atom#58

Pymakr does not load on Visual Studio Code Start

I made the critical mistake of shutting down Visual Studio Code earlier today and now I cannot get the Pymakr extension to load on Code startup. I have tried all 5 of the available versions for Windows (User 32 / 64 bit, System 32 / 64 bit, and the zip folder), performing a complete wipe of Code between each installation (instructions here)

I see in the console output (available under Developer Tools) that Pymakr is failing due to pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node is not a valid Win32 application

I'm not sure what (if anything) changed on my system earlier today. All I did was shut down Visual Studio Code so I could run the Pycom firmware updater on a GPy, and then Pymakr refused to load the next time I started Visual Studio Code.

Visual Studio Code information

Version: 1.33.1
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:27:14.102Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134

Output from the Console window (available under Help-> Toggle Developer Tools):

extensionService.ts:800 Activating extension 'pycom.pymakr' failed: \\?\c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node is not a valid Win32 application. \\?\c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node. _logMessageInConsole @ extensionService.ts:800 console.ts:134 [Extension Host] Activating extension pycom.pymakr failed: \\?\c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node is not a valid Win32 application. \\?\c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node t.log @ console.ts:134 console.ts:134 [Extension Host] Here is the error stack: Error: \\?\c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node is not a valid Win32 application. \\?\c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\build\Release\bindings.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20) at Object.Module._extensions..node (internal/modules/cjs/loader.js:740:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at n (c:\VSCode\resources\app\out\vs\loader.js:15:874) at bindings (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\bindings\bindings.js:81:44) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\lib\win32.js:1:191) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\lib\win32.js:111:3) at Module.t._initNodeRequire.r._compile (c:\VSCode\resources\app\out\vs\loader.js:16:90) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at n (c:\VSCode\resources\app\out\vs\loader.js:15:874) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\lib\index.js:6:22) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\@serialport\bindings\lib\index.js:17:3) at Module.t._initNodeRequire.r._compile (c:\VSCode\resources\app\out\vs\loader.js:16:90) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at n (c:\VSCode\resources\app\out\vs\loader.js:15:874) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\serialport\lib\index.js:2:17) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\node_modules\serialport\lib\index.js:17:3) at Module.t._initNodeRequire.r._compile (c:\VSCode\resources\app\out\vs\loader.js:16:90) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at n (c:\VSCode\resources\app\out\vs\loader.js:15:874) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\lib\connections\pyserial.js:20:18) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\lib\connections\pyserial.js:238:3) at Module.t._initNodeRequire.r._compile (c:\VSCode\resources\app\out\vs\loader.js:16:90) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at n (c:\VSCode\resources\app\out\vs\loader.js:15:874) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\lib\pymakr.js:18:17) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\lib\pymakr.js:834:3) at Module.t._initNodeRequire.r._compile (c:\VSCode\resources\app\out\vs\loader.js:16:90) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at n (c:\VSCode\resources\app\out\vs\loader.js:15:874) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\pymakr.js:3:14) at Object.<anonymous> (c:\VSCode\data\extensions\pycom.pymakr-1.1.0\pymakr.js:137:3) at Module.t._initNodeRequire.r._compile (c:\VSCode\resources\app\out\vs\loader.js:16:90) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Function.t._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:729:537) at Function.t.getExtensionPathIndex.then.a._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:691:639) at Function.t.getExtensionPathIndex.then.r._load (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:655:197) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Function.i [as __$__nodeRequire] (c:\VSCode\resources\app\out\vs\loader.js:31:542) at c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:717:918 at E._doActivateExtension (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:2) at E._activateExtension (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:716:772) at E.<anonymous> (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:714:224) at Generator.next (<anonymous>) at n (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:11:176) at new Promise (<anonymous>) at n (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:10:975) at Object.actualActivateExtension (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:713:946) at p._activateExtension (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:457:765) at define._activateExtensions.i.length.Promise.all.o.map.e (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:457:449) at Array.map (<anonymous>) at p._activateExtensions (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:457:437) at p.activateById (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:455:604) at E._activateById (c:\VSCode\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:715:497)

switch version numbering to X.Y.0

Feature Request 🚀

Could you change the version numbering from 1.0.7 to 1.7.0 please ?
ie use the <Major>.<Minor>.<Patch> schema .

That would allow me and other co-authors to use increasing patch numbers ( ie 1.7.1 … 1.7.99 , and still automatically get updated when there is a pycom release of a next <Minor> version i.e. 1.8.0.

In addition it may help aligning the Major & Minor version numbers between VSCode and Atom Add-ins.

/jos

[bug] VSCode update 1.31.0 breaks pymakr addin

Issue Type: Bug

Start : working environment with pymakr

VSCode updates to 1.31.0

After update pymakr addin does not work anymore
any attempt to use results in an error such as:
command 'pymakr.listCommands' not found

Tried :

  • re-installation of add-in does not resolve the issue

see also : microsoft/vscode#68230

Extension version: 1.0.5
VS Code version: Code 1.31.0 (7c66f58312b48ed8ca4e387ebd9ffe9605332caa, 2019-02-05T22:35:56.624Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 15.93GB (6.54GB free)
Process Argv
Screen Reader no
VM 0%

Add : Run a line or block of code

Feature Request 🚀

Allow a lines of code , or a block of code to be set to the board for execution,
similar to the Ctrl-Enter shortcut in VSCode + Python

Describe the solution you'd like

-Assign keybinding ( Ctrl-Enter / Ctrl-Shift-L or something)
if the cursor is on a line

send that line to the board
execute the code
put focus back in the editor

if a block is selected

send that block to the board ( must use paste-mode)
execute the code
put focus back in the editor

this would allow a developer to test single lines, or block of code ,
and effectively single-step though a piece of code by running it line by line

as a further enhancement, extraneous indentation could be removed to allow running if sub-sections of indented code

Describe alternatives you've considered

Copy and Paste from the editor to the terminal is possible , but error prone
this is not an effective workflow

Teachability, Documentation, Adoption, Migration Strategy

If you can, explain how users will be able to use this and possibly write out a version the docs. Maybe a screenshot or design?

I have sample working code in master...Josverl:RunByLine

Intellisense/linting for pycom libraries

Feature Request 🚀

Describe the solution you'd like

https://code.visualstudio.com/docs/editor/intellisense / https://code.visualstudio.com/docs/python/linting also for modules/classes from the MicroPython and Pycom libraries. Without code completion / linting everything has to be looked up in the docs and even simple mistakes are not highlighted by vsc as they normally would be via pylint.

Teachability, Documentation, Adoption, Migration Strategy

Maybe this can be done with a venv where the pycom modules/classes are imported/installed so that they are found by the vsc Python extension. I also found https://github.com/Josverl/micropython-stubber which can be used/extended for this.

There was an error with your serialport module

Each time I run Visual Studio Code I get the following error message now:

There was an error with your serialport module, Pymakr will likely not work properly. Please try to install again or report an issue on our github (see developer console for details)

Vs Code details are:
Version: 1.36.0 (user setup)
Commit: 0f3794b38477eea13fb47fbe15a42798e6129338
Date: 2019-07-03T13:25:46.372Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17134
Pymakr: 1.1.2

I've tried uninstalling and reinstalling previous versions but that just removes the error and pymakr doesn't load.

remove unneeded files from package

Feature Request 🚀

The Pymakr add-in is slow to install and contains unneeded files (likely related)

( observed on windows , not sure on other platforms)
The package has a lot of unneeded build , documentation and source files included.
There is a lot of room that can be won by not including these

I addition the installation and startup seem to go significantly quicker if the /src folder is not included.
I have not timed this , but anecdotally sometimes Pymakr install can take 10-15 minutes , and it is down to <30 seconds with a reduced package ( but then I had excluded too much , so need to find the optimum )

However it is not quite clear (to me) which files to include / exclude from the packaging process.
Include:

  • /lib
  • package files
  • only the needed filles for serial connection / terminal

Exclude:

  • /Src
  • Documentation files
  • unneeded/redundant copies of serial lib

use .vscodeignore to reduce the package size and reduce installation time

use .vscodeignore to exclude the unneeded files and folders

.vscode/**
.vscode-test/**
test/**
src/**
.gitignore
jsconfig.json
vsc-extension-quickstart.md
.eslintrc.json

but I have not been able to find the optimum as I do not quite understand the loading strategy for the serial / terminal.

reference : https://vscode-docs.readthedocs.io/en/latest/tools/vscecli/

.vscodeignore
You can create a .vscodeignore file to exclude some files from being included in your extension's package. This file is a collection of glob patterns, one per line.
For example:

**/*.ts
**/tsconfig.json
!file.ts

You should ignore all files not needed at runtime. For example, if your extension is written in TypeScript, you should ignore all **/*.ts files, like in the previous example.
Note: Development dependencies listed in devDependencies will be automatically ignored, you don't need to add them to the .vscodeignore file.

just noticed that 'vsce package' also throws a warning :

C:\develop\pymakr-vsc>vsce package
This extension consists of 5923 separate files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension
 DONE  Packaged: C:\develop\pymakr-vsc\pymakr-1.0.7.vsix (5923 files, 18.89MB)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.