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

xsbug locate source has bad .js filter on Linux #988

Closed
tve opened this issue Dec 15, 2022 · 4 comments
Closed

xsbug locate source has bad .js filter on Linux #988

tve opened this issue Dec 15, 2022 · 4 comments

Comments

@tve
Copy link
Contributor

tve commented Dec 15, 2022

Build environment: Arch Linux

Description
When xsbug can't locate a source file due to directory path mismatch since compilation it has a "locate" button which brings up a file browser/selector. This selector ostensibly filters for .js files but that appears broken.

Steps to Reproduce

  1. Build an example project using docker, which causes paths to differ from the host
  2. Start xsbug and load the app, e.g. esp32
  3. xsbug comes up and tries to show /data/main.js, there's a locate button, use that and try to find the file

Here's xsbug:
image

So far so good, the locate button brings up this file dialog, which I have open on the source directory:
image

Notes:

  • the bug is that main.js does not appear
  • ls in that dir shows: foo.js js main.js manifest.json
  • I created js and foo.js after seeing that main.js doesn't appear
  • the filter at the bottom-right says js, I wonder whether it should say .js, it's ominous that the only file shown is the one called exactly js...
  • I assume you can create the issue by moving the source files after building the image
@phoddie
Copy link
Collaborator

phoddie commented Dec 15, 2022

Build an example project using docker, which causes paths to differ from the host

I assume you can create the issue by moving the source files after building the image

Please provide steps to reliably reproduce the issue without docker. Thank you.

@tve
Copy link
Contributor Author

tve commented Dec 15, 2022

STR on Linux:

  • Build a project that produces an error in xsbug, for example the drivers/lora example
  • xsbug shows the error at the bottom (/home/sw/moddable/moddable/examples/drivers/lora/main.js (26) # Break: main: get device: undefined variable!) and the source file
  • Rename trhe source directory, e.g., mv lora lora2
  • the source file immediately disappears from xsbug and you get a "locate" button
  • hit the button a file browser shows up, navigate to the lora2 dir
  • the source file main.js is not visible in the file browser

@phoddie
Copy link
Collaborator

phoddie commented Dec 17, 2022

Thank you for the updated steps. We'll take a look.

@phoddie
Copy link
Collaborator

phoddie commented Dec 27, 2022

This has been fixed by this commit. We had previously disabled the file filter on Windows and macOS. That's now been appleid to Linux as well.

@phoddie phoddie closed this as completed Dec 27, 2022
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