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

Micropython debugging #3184

Open
thierryppp opened this issue May 2, 2024 · 3 comments
Open

Micropython debugging #3184

thierryppp opened this issue May 2, 2024 · 3 comments

Comments

@thierryppp
Copy link

In micropython with Thonny IDE
Is it possible to import modules from a computer disk during test / debugging, but not from flash?

Example ==> in subdirectory /toto you have a file foo.py

Code

import time
from machine import Pin, freq
from toto.foo import foo ==> error no subdirectory toto

It's normal on your card /flash you haven't sub toto

Thanks,
Thierry.

@wohltat
Copy link

wohltat commented May 10, 2024

I don't get what's the problem with that.
Can't you just copy the file to the file system on the flash into the /toto/ folder?

As far as i know it is not possible to directly import files from disk. You have to either copy them or run a script (F5) and have them pasted.

@wohltat
Copy link

wohltat commented May 10, 2024

Speaking of micropython debugging, it would be useful maybe to integrate debugging capabilities from the mpdb project into thonny.
https://github.com/bobveringa/mpdb

@aivarannamaa
Copy link
Member

@thierryppp, Thonny does not support loading modules from the development machine, but mpremote does, by using a clever way of mapping a special kind of file system in MicroPython.

@wohltat, it looks like mpdb does not offer any solutions to the main problem with MicroPython debugging -- the lack of access to local variables. You can read more at https://forum.micropython.org/viewtopic.php?t=7995

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

No branches or pull requests

3 participants